All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix double-free in tapdisk cleanup
@ 2007-08-27 19:02 Ben Guthro
  0 siblings, 0 replies; only message in thread
From: Ben Guthro @ 2007-08-27 19:02 UTC (permalink / raw)
  To: xen-devel; +Cc: Josh Nicholas

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

Fixed double-free() during normal tapdisk cleanup for quit process

Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>


[-- Attachment #2: tapdisk-cleanup-fix.patch --]
[-- Type: text/x-patch, Size: 638 bytes --]

diff -r 58aa2447f212 tools/blktap/drivers/tapdisk.c
--- a/tools/blktap/drivers/tapdisk.c	Wed Jul 11 15:26:55 2007 -0400
+++ b/tools/blktap/drivers/tapdisk.c	Wed Jul 11 15:26:58 2007 -0400
@@ -849,6 +849,8 @@ int main(int argc, char *argv[])
 		exit(-1);
 	}
 
+	DPRINTF("running R: '%s' W: '%s'\n", argv[1], argv[2]);
+
 	while (run) 
         {
 		ret = 0;
@@ -914,12 +916,13 @@ int main(int argc, char *argv[])
 		s = ptr->s;
 
 		unmap_disk(s);
-		free(s->blkif);
-		free(s->ring_info);
-		free(s);
+
 		close(ptr->tap_fd);
 		ptr = ptr->next;
 	}
+
+	DPRINTF("done R: '%s' W: '%s'\n", argv[1], argv[2]);
+
 	closelog();
 
 	return 0;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-27 19:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-27 19:02 [PATCH] Fix double-free in tapdisk cleanup Ben Guthro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.