- avoid to free uninitialized memmory
authorJiří Škrábal <nykolas@ics.muni.cz>
Thu, 10 Mar 2005 14:20:48 +0000 (14:20 +0000)
committerJiří Škrábal <nykolas@ics.muni.cz>
Thu, 10 Mar 2005 14:20:48 +0000 (14:20 +0000)
org.glite.lb.server/project/version.properties
org.glite.lb.server/src/lb_proto.c

index 7aa8302..6398725 100644 (file)
@@ -1,4 +1,4 @@
 #Wed Jan 12 04:18:30 CET 2005
-module.version=1.2.3
+module.version=1.2.4
 module.build=146
 module.age=1
index e1709b7..c6fb6d9 100644 (file)
@@ -788,9 +788,9 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx,
                        }
                }
                else if (!strncmp(requestPTR,KEY_QUERY_SEQUENCE_CODE,sizeof(KEY_QUERY_SEQUENCE_CODE)-1)) {
-                       char            *source;
-                       char            *seqCode;
-                       edg_wlc_JobId   jobId;
+                       char            *source = NULL;
+                       char            *seqCode = NULL;
+                       edg_wlc_JobId   jobId = NULL;
                        
 
                        if (parseQuerySequenceCodeRequest(ctx, messageBody, &jobId, &source))
@@ -817,10 +817,9 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx,
                                                ret = HTTP_INTERNAL;
                        }
 
-                       free(source);
-                       free(seqCode);
+                       if ( source ) free(source);
+                       if ( seqCode ) free(seqCode);
                        edg_wlc_JobIdFree(jobId);
-
                }