]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Fix heap corruptor in ply-boot-server
authorRay Strode <rstrode@redhat.com>
Tue, 24 Feb 2009 18:36:15 +0000 (13:36 -0500)
committerRay Strode <rstrode@redhat.com>
Tue, 24 Feb 2009 18:38:11 +0000 (13:38 -0500)
This fixes a memory corruption bug that
cropped up during a round of leak fixes
a while back.

src/ply-boot-server.c

index 8615f3bdf2dd169c5a50a31e5a0444c2e70403f6..77115e5005d8d98b7e446bc01be1abbf8bfe86f0 100644 (file)
@@ -196,7 +196,7 @@ ply_boot_connection_read_request (ply_boot_connection_t  *connection,
 
       if (!ply_read (connection->fd, &argument_size, sizeof (uint8_t)))
         {
-          free(command);
+          free (*command);
           return false;
         }
 
@@ -204,7 +204,7 @@ ply_boot_connection_read_request (ply_boot_connection_t  *connection,
 
       if (!ply_read (connection->fd, *argument, argument_size))
         {
-          free(command);
+          free (*command);
           return false;
         }
     }
@@ -307,7 +307,7 @@ ply_boot_connection_on_request (ply_boot_connection_t *connection)
                       strlen (PLY_BOOT_PROTOCOL_RESPONSE_TYPE_NAK)))
         ply_error ("could not write bytes: %m");
 
-      free(command);
+      free (command);
       return;
     }