Skip to contentSkip to conversation

[5526] Fix possibly SEGV in tcp migration error case.

Qemu-devel Anthony Liguori 1 participant 1 message Oct 24, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5526

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5526
Author:   aliguori
Date:     2008-10-24 22:08:22 +0000 (Fri, 24 Oct 2008)

Log Message:
-----------
Fix possibly SEGV in tcp migration error case.

Spotted by hpoussin.

Modified Paths:
--------------
trunk/migration-tcp.c

Modified: trunk/migration-tcp.c
===================================================================

migration-tcp.c +1 -1
@@ -283,7 +283,7 @@
         dprintf("connect failed\n");
         close(s->fd);
         qemu_free(s);
-	s = NULL;
+        return NULL;
     } else if (ret >= 0)
         tcp_connect_migrate(s);