From 58c23490d29605e2e85d89d0a0b69626c611fb03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Thu, 5 Feb 2009 14:27:06 +0000 Subject: [PATCH] avoid double-free --- org.glite.lb.server/src/notif_match.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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, ':')) ) -- 1.8.2.3