From: Miloš Mulač Date: Fri, 14 Mar 2008 15:10:27 +0000 (+0000) Subject: NULL-ize string variables X-Git-Tag: merge_313_4_dst~12 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=11f5e141f6f38f282b6a37bb7e3f3e36056b28f2;p=jra1mw.git NULL-ize string variables set error in case of malformed notifID --- diff --git a/org.glite.lb.server/src/notification.c b/org.glite.lb.server/src/notification.c index f3e4e56..68584ff 100644 --- a/org.glite.lb.server/src/notification.c +++ b/org.glite.lb.server/src/notification.c @@ -614,14 +614,16 @@ static int update_notif( const char *dest, const char *valid) { - char *nid_s = NULL, - *host = NULL, - *stmt, *aux; - int ret, port; + char *nid_s = NULL, *host = NULL, + *stmt = NULL, *aux = NULL; + int ret, port; if ( !(nid_s = edg_wll_NotifIdGetUnique(nid)) ) + { + edg_wll_SetError(ctx, EINVAL, "Malformed notification ID."); goto cleanup; + } /* Format SQL update string * (Only the owner could update the notification registration)