Skip to content

Commit

Permalink
prevent leak in case of oom
Browse files Browse the repository at this point in the history
Fixes Coverity #211383
  • Loading branch information
razvancrainea committed Jul 20, 2020
1 parent 2b93440 commit c72de0d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cfg_pp.c
Expand Up @@ -562,6 +562,7 @@ void cfg_dump_context(const char *file, int line, int colstart, int colend)
hiline = malloc(colend - colstart);
if (!hiline) {
LM_ERR("oom\n");
free(wsbuf);
return;
}
memset(hiline, '~', colend - colstart);
Expand Down

0 comments on commit c72de0d

Please sign in to comment.