Skip to contentSkip to conversation

LVM2/daemons/common daemon-server.c

PATCH [email protected] 1 participant 1 message Jul 20, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2011-07-20 18:23:34

Modified files:
daemons/common : daemon-server.c

Log message:
Fix two small (but eventually unbounded) leaks in daemon-server.c.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/common/daemon-server.c.diff?cvsroot=lvm2&r1=1.8&r2=1.9

daemons/common/daemon-server.c +2 -0
@@ -253,6 +253,7 @@
 		if (!res.buffer) {
 			write_config_node(res.cft->root, buffer_line, &res);
 			buffer_rewrite(&res.buffer, "%s\n\n", NULL);
+			destroy_config_tree(res.cft);
 		}
 
 		write_buffer(b->client.socket_fd, res.buffer, strlen(res.buffer));
@@ -261,6 +262,7 @@
 	}
 fail:
 	/* TODO what should we really do here? */
+	free(baton);
 	return NULL;
 }