Initiate new array item
authorZdeněk Šustr <sustr4@cesnet.cz>
Wed, 8 Aug 2012 08:44:31 +0000 (08:44 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Wed, 8 Aug 2012 08:44:31 +0000 (08:44 +0000)
org.glite.lb.server/src/lb_proto.c

index ae11218..45bcf41 100644 (file)
@@ -495,6 +495,7 @@ int parse_query_conditions(edg_wll_Context ctx, const char *query, edg_wll_Query
 
        for( cond = strtok_r(q, "&", &vartok); cond ; cond = strtok_r(NULL, "&", &vartok) ) {
                conds=(edg_wll_QueryRec**)realloc(conds, sizeof(edg_wll_QueryRec*) * (i+2));
+               conds[i] = NULL;
                conds[i+1] = NULL;
 
                len = strcspn(cond, "=<>");