summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-09-13 18:21:48 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-09-13 18:21:48 +0000
commitf207a4f0f6d5d38a3e357f62d4976bedaed2cf4f (patch)
tree579a077380979129a6bab229bfb93c0833f5893f
parent5ec20cab698055029198b10afb4db20bee06ce72 (diff)
fixed search transaction reqbuf double free
-rw-r--r--src/sdp.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/sdp.c b/src/sdp.c
index e311f014..d82a23d7 100644
--- a/src/sdp.c
+++ b/src/sdp.c
@@ -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;