From 3101ba8c54c206e9a94843937d9503d5df18663d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Mon, 7 Feb 2011 19:01:22 +0000 Subject: [PATCH] Warnings and memory leak. --- org.glite.lb.server/src/notif_match.c | 3 ++- org.glite.lb.server/src/notification.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/org.glite.lb.server/src/notif_match.c b/org.glite.lb.server/src/notif_match.c index 829c54b..961c87c 100644 --- a/org.glite.lb.server/src/notif_match.c +++ b/org.glite.lb.server/src/notif_match.c @@ -46,7 +46,8 @@ int edg_wll_NotifMatch(edg_wll_Context ctx, const edg_wll_JobStat *oldstat, cons edg_wll_NotifId nid = NULL; char *jobq,*ju = NULL,*jobc[6]; glite_lbu_Statement jobs = NULL; - int ret,i,authz_flags = 0; + int ret,authz_flags = 0; + size_t i; time_t expires,now = time(NULL); char *cond_where = NULL; diff --git a/org.glite.lb.server/src/notification.c b/org.glite.lb.server/src/notification.c index 329de31..973cee9 100644 --- a/org.glite.lb.server/src/notification.c +++ b/org.glite.lb.server/src/notification.c @@ -176,6 +176,7 @@ int edg_wll_NotifNewServer( goto rollback; } else { + free(q); trio_asprintf(&q,"insert into notif_jobs(notifid,jobid) values ('%|Ss','%|Ss')", nid_s,NOTIF_ALL_JOBS); glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, @@ -693,7 +694,7 @@ static int update_notif( { char *nid_s = NULL, *host = NULL, *stmt = NULL, *aux = NULL; - int ret, port = 0; + int ret = 0; if ( !(nid_s = edg_wll_NotifIdGetUnique(nid)) ) -- 1.8.2.3