From: František Dvořák Date: Thu, 5 Feb 2009 14:27:06 +0000 (+0000) Subject: avoid double-free X-Git-Tag: glite-jobid-api-java_R_1_0_0_6~6 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=58c23490d29605e2e85d89d0a0b69626c611fb03;p=jra1mw.git avoid double-free --- diff --git a/org.glite.lb.server/src/notif_match.c b/org.glite.lb.server/src/notif_match.c index 192b6b3..1cf851b 100644 --- a/org.glite.lb.server/src/notif_match.c +++ b/org.glite.lb.server/src/notif_match.c @@ -87,7 +87,7 @@ int edg_wll_NotifMatch(edg_wll_Context ctx, const edg_wll_JobStat *oldstat, cons " and (j.jobid = '%|Ss' or j.jobid = '%|Ss' %s) %s", ju = edg_wlc_JobIdGetUnique(stat->jobId),NOTIF_ALL_JOBS,cond_where ? cond_where : "",cond_and_where ? cond_and_where : ""); - free(ju); + free(ju); ju = NULL; if (edg_wll_ExecSQL(ctx,jobq,&jobs) < 0) goto err; @@ -103,9 +103,11 @@ int edg_wll_NotifMatch(edg_wll_Context ctx, const edg_wll_JobStat *oldstat, cons char *dest, *aux; int port; - if (debug) fprintf(stderr,"NOTIFY: %s, job %s\n",jobc[0], + if (debug) { + fprintf(stderr,"NOTIFY: %s, job %s\n",jobc[0], ju = edg_wlc_JobIdGetUnique(stat->jobId)); - free(ju); + free(ju); ju = NULL; + } dest = strdup(jobc[1]); if ( !(aux = strchr(dest, ':')) )