Skip to content

Commit

Permalink
client/Client.cc: fix USE_AFTER_FREE
Browse files Browse the repository at this point in the history
Don't call put_request() twice, it's already called by
unregister_request()

Fix for:

CID 1405360 (#1 of 1): Use after free (USE_AFTER_FREE)
 deref_arg: Calling put_request dereferences freed pointer request

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
  • Loading branch information
dalgaaf authored and tchaikov committed Sep 2, 2017
1 parent a02aca3 commit 9cb7906
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/client/Client.cc
Expand Up @@ -1730,7 +1730,6 @@ int Client::make_request(MetaRequest *request,
r = request->get_abort_code();
request->item.remove_myself();
unregister_request(request);
put_request(request); // ours
return r;
}

Expand Down

0 comments on commit 9cb7906

Please sign in to comment.