Skip to content
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
Closed

Memory leak in PJ_ob_tran.c #497

dusanjovic opened this issue Mar 8, 2017 · 2 comments

Comments

@dusanjovic
Copy link
Contributor

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
Copy link
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
Copy link
Member

rouault commented Mar 8, 2017

Fixed per #498
Thanks

@rouault rouault closed this as completed Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants