New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in PJ_ob_tran.c #497

Closed
dusanjovic opened this Issue Mar 8, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@dusanjovic
Contributor

dusanjovic commented Mar 8, 2017

There's a small memory leak in PJ_ob_tran.c (in freeup_new):

diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c
index b0c22f66..eae3ab1d 100644
--- a/src/PJ_ob_tran.c
+++ b/src/PJ_ob_tran.c
@@ -86,7 +86,7 @@ static void *freeup_new (PJ *P) {                       /* Destructor */
         return pj_dealloc (P);
 
     if (P->opaque->link)
-        return pj_dealloc (P->opaque->link);
+        pj_dealloc (P->opaque->link);
 
     pj_dealloc (P->opaque);
     return pj_dealloc(P);

freeup_new must not return before both P->opaque and P are deallocated.

@rouault

This comment has been minimized.

Member

rouault commented Mar 8, 2017

Can you turn your proposed fix into a pull request so it is tested by continuous integration and can be merged easily ?

@rouault

This comment has been minimized.

Member

rouault commented Mar 8, 2017

Fixed per #498
Thanks

@rouault rouault closed this Mar 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment