public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 daemons/clvmd/clvmd-command.c ./WHATS_NEW
@ 2010-12-17 12:37 zkabelac
  0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2010-12-17 12:37 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2010-12-17 12:37:50

Modified files:
	daemons/clvmd  : clvmd-command.c 
	.              : WHATS_NEW 

Log message:
	Fix NULL pointer check for *buf
	
	As ternary operator has lower priority then add operation, this check
	was not doing what seemed to be expected.
	
	So enclose the test in braces and check for NULL in *buf.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.43&r2=1.44
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1838&r2=1.1839

--- LVM2/daemons/clvmd/clvmd-command.c	2010/11/30 22:16:25	1.43
+++ LVM2/daemons/clvmd/clvmd-command.c	2010/12/17 12:37:49	1.44
@@ -168,8 +168,8 @@
 
 	/* Check the status of the command and return the error text */
 	if (status) {
-		*retlen = 1 + (*buf) ? dm_snprintf(*buf, buflen, "%s",
-						   strerror(status)) : -1;
+		*retlen = 1 + ((*buf) ? dm_snprintf(*buf, buflen, "%s",
+						    strerror(status)) : -1);
 	}
 
 	return status;
--- LVM2/WHATS_NEW	2010/12/15 12:49:55	1.1838
+++ LVM2/WHATS_NEW	2010/12/17 12:37:50	1.1839
@@ -1,5 +1,6 @@
 Version 2.02.79 -  
 ===================================
+  Fix NULL pointer check in error path in clvmd do_command(). (2.02.78)
   Fix device.c #include to ensure 64-bit fopen64 use. (2.02.51)
   Create /var/run/lvm directory during clvmd initialisation if missing.
   Use new dm_prepare_selinux_context instead of dm_set_selinux_context.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* LVM2 daemons/clvmd/clvmd-command.c ./WHATS_NEW
@ 2010-12-22 12:14 zkabelac
  0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2010-12-22 12:14 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2010-12-22 12:14:20

Modified files:
	daemons/clvmd  : clvmd-command.c 
	.              : WHATS_NEW 

Log message:
	Fix memory leak in debug mode of restart_clvmd() error path

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.44&r2=1.45
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1851&r2=1.1852

--- LVM2/daemons/clvmd/clvmd-command.c	2010/12/17 12:37:49	1.44
+++ LVM2/daemons/clvmd/clvmd-command.c	2010/12/22 12:14:11	1.45
@@ -408,6 +408,7 @@
 	for (i = 0; i < argc && argv[i]; i++)
 		free(argv[i]);
 	free(argv);
+	free(debug_arg);
 
 	return 0;
 }
--- LVM2/WHATS_NEW	2010/12/22 12:10:56	1.1851
+++ LVM2/WHATS_NEW	2010/12/22 12:14:17	1.1852
@@ -1,5 +1,6 @@
 Version 2.02.80 - 
 ====================================
+  Fix memory leak in debug mode of restart_clvmd() error path.
   Log error message for pthread_join() failure in clvmd.
 
 Version 2.02.79 - 20th December 2010


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-22 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-17 12:37 LVM2 daemons/clvmd/clvmd-command.c ./WHATS_NEW zkabelac
2010-12-22 12:14 zkabelac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).