Skip to content

Commit

Permalink
Merge branch '29-japi_context-is-used-after-a-free-call' into 'master'
Browse files Browse the repository at this point in the history
Resolve "japi_context is used after a free() call"

Closes #29

See merge request ks-ip-lib/software/libjapi!44
  • Loading branch information
cstender committed Mar 3, 2020
2 parents afe05c2 + 2ca880b commit 412754e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/japi.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ int japi_destroy(japi_context *ctx)
free(req);
req = req_next;
}
free(ctx);

psc = ctx->push_services;
while (psc != NULL) {
Expand All @@ -181,6 +180,8 @@ int japi_destroy(japi_context *ctx)
psc = psc_next;
}

free(ctx);

return 0;
}

Expand Down

0 comments on commit 412754e

Please sign in to comment.