X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fguestfs.c;h=612ac000c2ec2a9e6ceb257630f693a4cd890760;hb=f0a5cd69f92f734b94e2361a939e4a1eb01dad9c;hp=be7b0c794e6117b904419d31b2bf49f55e1c145a;hpb=33377fc61d4356a0e83cf7ef39d545842647481c;p=libguestfs.git diff --git a/src/guestfs.c b/src/guestfs.c index be7b0c7..612ac00 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -308,6 +308,8 @@ guestfs_close (guestfs_h *g) } /* release mutex (XXX) */ + free (g->msg_in); + free (g->msg_out); free (g->last_error); free (g); } @@ -824,6 +826,11 @@ guestfs_launch (guestfs_h *g) /* Parent (library). */ g->pid = r; + free (kernel); + kernel = NULL; + free (initrd); + initrd = NULL; + /* Fork the recovery process off which will kill qemu if the parent * process fails to do so (eg. if the parent segfaults). */ @@ -2168,6 +2175,8 @@ select_main_loop_run (guestfs_main_loop *mlv, guestfs_h *g) xset2 = ml->xset; r = select (ml->max_fd+1, &rset2, &wset2, &xset2, NULL); if (r == -1) { + if (errno == EINTR || errno == EAGAIN) + continue; perrorf (g, "select"); ml->is_running = 0; return -1;