diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-09-13 18:21:48 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-09-13 18:21:48 +0000 |
commit | f207a4f0f6d5d38a3e357f62d4976bedaed2cf4f (patch) | |
tree | 579a077380979129a6bab229bfb93c0833f5893f | |
parent | 5ec20cab698055029198b10afb4db20bee06ce72 (diff) |
fixed search transaction reqbuf double free
-rw-r--r-- | src/sdp.c | 21 |
1 files changed, 9 insertions, 12 deletions
@@ -3204,10 +3204,9 @@ int sdp_service_search_async(sdp_session_t *session, const sdp_list_t *search, u return 0; end: - if (t) { - if (t->reqbuf) - free(t->reqbuf); - free(t); + if (t->reqbuf) { + free(t->reqbuf); + t->reqbuf = NULL; } return -1; @@ -3314,10 +3313,9 @@ int sdp_service_attr_async(sdp_session_t *session, uint32_t handle, sdp_attrreq_ return 0; end: - if (t) { - if (t->reqbuf) - free(t->reqbuf); - free(t); + if (t->reqbuf) { + free(t->reqbuf); + t->reqbuf = NULL; } return -1; @@ -3429,10 +3427,9 @@ int sdp_service_search_attr_async(sdp_session_t *session, const sdp_list_t *sear return 0; end: - if (t) { - if (t->reqbuf) - free(t->reqbuf); - free(t); + if (t->reqbuf) { + free(t->reqbuf); + t->reqbuf = NULL; } return -1; |