[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] LVM2/lib/format_text export.c



CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac sourceware org	2012-01-25 22:35:36

Modified files:
	lib/format_text: export.c 

Log message:
	Instrument code that pointer are already released
	
	Set pointers to NULL since on the function exit they are no longer valid.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/export.c.diff?cvsroot=lvm2&r1=1.85&r2=1.86

--- LVM2/lib/format_text/export.c	2012/01/19 15:31:45	1.85
+++ LVM2/lib/format_text/export.c	2012/01/25 22:35:36	1.86
@@ -757,11 +757,15 @@
 	r = 1;
 
       out:
-	if (f->mem)
+	if (f->mem) {
 		dm_pool_destroy(f->mem);
+		f->mem = NULL;
+	}
 
-	if (f->pv_names)
+	if (f->pv_names) {
 		dm_hash_destroy(f->pv_names);
+		f->pv_names = NULL;
+	}
 
 	return r;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]