Commit 935f5b4a authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Fix possible memory leaks

parent 4f079511
......@@ -455,11 +455,13 @@ int fd_sess_new ( struct session ** session, DiamId_t diamid, size_t diamidlen,
CHECK_MALLOC_DO(sess = new_session(sid, sidlen, hash),
{
ret = ENOMEM;
free(sid);
goto out;
} );
fd_list_insert_before(li, &sess->chain_h); /* hash table */
} else {
free(sid);
/* it was found: was it previously destroyed? */
if ((*session)->is_destroyed == 0) {
ret = EALREADY;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment