Skip to contentSkip to conversation

LVM2 ./WHATS_NEW daemons/clvmd/clvmd.c

PATCH [email protected] 1 participant 1 message Mar 28, 2008

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: ccaulfield at sourceware.org 2008-03-28 12:58:10

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

Log message:
Fix a couple of uninitialised variables. The newfd one could cause some obscure hangs.

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

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.34 -
 ===================================
+  Fix uninitialised variable in clvmd that could cause odd hangs.
   Add vgmerge tests.
   Add pvseg_is_allocated() for identifying a PV segment allocated to a LV.
   Add list_move() for moving elements from one list to another.
daemons/clvmd/clvmd.c +2 -2
@@ -633,7 +633,7 @@
 				}
 
 				if (FD_ISSET(thisfd->fd, &in)) {
-					struct local_client *newfd;
+					struct local_client *newfd = NULL;
 					int ret;
 
 					/* Do callback */
@@ -1613,7 +1613,7 @@
 static int send_message(void *buf, int msglen, const char *csid, int fd,
 			const char *errtext)
 {
-	int len;
+	int len = 0;
 	int saved_errno = 0;
 	struct timespec delay;
 	struct timespec remtime;