f0b6e1e
commit bef9e0035464a906dc520f1d135208b537cc65c3
f0b6e1e
Author: Brian Bockelman <bbockelm@cse.unl.edu>
f0b6e1e
Date:   Tue Jun 18 20:38:41 2019 -0500
f0b6e1e
f0b6e1e
    Free memory for temporary data buffer.
f0b6e1e
    
f0b6e1e
    With this, deserializing the macaroon no longer leaks the buffer
f0b6e1e
    on success.
f0b6e1e
f0b6e1e
diff --git a/macaroons.c b/macaroons.c
f0b6e1e
index ab296c8..d35f6bf 100644
f0b6e1e
--- a/macaroons.c
f0b6e1e
+++ b/macaroons.c
f0b6e1e
@@ -1741,6 +1741,7 @@ macaroon_deserialize(const char* _data, enum macaroon_returncode* err)
f0b6e1e
         return NULL;
f0b6e1e
     }
f0b6e1e
 
f0b6e1e
+    free(data);
f0b6e1e
     *err = MACAROON_SUCCESS;
f0b6e1e
     return M;
f0b6e1e
 }