Skip to content

Commit

Permalink
Fixed memory leak issue with script_str variable
Browse files Browse the repository at this point in the history
  • Loading branch information
asanchez1987 committed Mar 16, 2015
1 parent dc6c5f5 commit 80ab6ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ extern int slurm_jobcomp_log_record(struct job_record *job_ptr)
xrealloc(tmp, sizeof(char) * strlen(script_str) + 1 + 12);
sprintf(tmp, ",\"script\":\"%s\"", script_str);
xstrcat(buffer, tmp);
xfree(script_str);
}

if (job_ptr->assoc_ptr) {
Expand Down Expand Up @@ -936,7 +937,6 @@ extern int slurm_jobcomp_log_record(struct job_record *job_ptr)
}
}

xfree(script_str);
xfree(parent_accounts);
xfree(buffer);
xfree(tmp);
Expand Down

0 comments on commit 80ab6ff

Please sign in to comment.