*/
if (ctx->isProxy && local_job) {
if (ev->any.priority & EDG_WLL_LOGFLAG_DIRECT) {
+ edg_wll_FreeEvent(ev);
+ free(ev);
return 0;
}
else {
if (EEXIST == edg_wll_Error(ctx, NULL, NULL)) {
/* XXX: this should not happen */
edg_wll_ResetError(ctx);
+ free(stmt); stmt = NULL;
tagp++;
continue;
}
else
goto cleanup;
}
+ free(stmt); stmt = NULL;
tagp++;
}
}
free(icvalues);
if ((dbret = edg_wll_ExecSQL(ctx,stmt,NULL)) < 0) goto cleanup;
+ free(stmt); stmt = NULL;
if (dbret == 0) {
edg_wll_IColumnsSQLPart(ctx, ctx->job_index_cols, &stat->pub, 1, &icnames, &icvalues);
free(icnames); free(icvalues);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto cleanup;
+ free(stmt); stmt = NULL;
}
if (update) {
"where jobid ='%|Ss' and ( seq<%d or version !='%|Ss')",
jobid_md5, seq, INTSTAT_VERSION);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto cleanup;
+ free(stmt); stmt = NULL;
}
if (update) {
trio_asprintf(&stmt, "delete from status_tags "
"where jobid ='%|Ss' and seq<%d", jobid_md5, seq);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto cleanup;
+ free(stmt); stmt = NULL;
}
cleanup:
free(dbt);
glite_lbu_TimeToDB(ec[m][n].value2.t.tv_sec, &dbt);
trio_asprintf(&out, "%s OR (e.time_stamp >= %s AND e.time_stamp <= %s)", conds, aux, dbt);
- free(dbt);
free(aux);
}
else if (ec[m][n].op == EDG_WLL_QUERY_OP_EQUAL) {
free(dbt);
glite_lbu_TimeToDB(ec[m][n].value2.t.tv_sec, &dbt);
trio_asprintf(&conds, "(e.time_stamp >= %s AND e.time_stamp <= %s)", aux, dbt);
- free(dbt);
free(aux);
}
else if (ec[m][n].op == EDG_WLL_QUERY_OP_EQUAL) {
trio_asprintf(&conds, "(e.time_stamp = %s AND e.usec = %d)",
dbt, ec[m][n].value.t.tv_usec);
}
- else
+ else {
trio_asprintf(&conds, "e.time_stamp %s %s", opToString(ec[m][n].op), dbt);
+ }
+ free(dbt);
break;
case EDG_WLL_QUERY_ATTR_LEVEL:
if (edg_wll_ExecSQL(ctx,stmt,&sh) < 0 || edg_wll_FetchRow(ctx,sh,1,NULL,&userid) < 0) goto clean;
if (sh) glite_lbu_FreeStmt(&sh);
+ free(stmt); stmt = NULL;
/* obtain next event sequence number */
ssrc,e->any.host,
stamp,e->any.timestamp.tv_usec,
now_s, e->any.level,userid);
+ free(stamp);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) {
if ((err = edg_wll_Error(ctx,NULL,NULL)) != EEXIST)
if (event->any.type == EDG_WLL_EVENT_REGJOB) {
trio_asprintf(&q,"select cert_subj from jobs,users where jobs.jobid='%|Ss'"
" AND jobs.userid=users.userid",unique);
- if ( (nar = edg_wll_ExecSQL(ctx,q,&stmt)) < 0 || edg_wll_FetchRow(ctx,stmt,1,NULL,&owner) < 0 )
+ if ( (nar = edg_wll_ExecSQL(ctx,q,&stmt)) < 0 || edg_wll_FetchRow(ctx,stmt,1,NULL,&owner) < 0 ) {
goto err;
+ }
+ free(q); q = NULL;
if (nar) {
/* job is already registered */