diff mbox

[libdmraid-events,3/3] Fix minor memory leak in lib_main

Message ID 20091211032413.811950494@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

NeilBrown Dec. 11, 2009, 3:22 a.m. UTC
None
diff mbox

Patch

--- libdmraid-events.orig/libdmraid-events.c
+++ libdmraid-events/libdmraid-events.c
@@ -209,7 +209,7 @@  static int lib_main(char op, const char*
     int lib_argc=3;
     char *lib_argv[4];
     
-    for(i=0; i<4; i++)
+    for(i=0; i<3; i++)
 		lib_argv[i]=malloc(strlen(device) + 1);
     
     strcpy(lib_argv[0], "dso");
@@ -229,7 +229,7 @@  static int lib_main(char op, const char*
 	libdmraid_exit(lc);
     }
 
-    for(i=0; i<4; i++)
+    for(i=0; i<3; i++)
 		free(lib_argv[i]);        
 
     return ret;