summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sdpd-request.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sdpd-request.c b/src/sdpd-request.c
index acfacaf4..ae08fa51 100644
--- a/src/sdpd-request.c
+++ b/src/sdpd-request.c
@@ -176,8 +176,10 @@ static int extract_des(uint8_t *buf, int len, sdp_list_t **svcReqSeq, uint8_t *p
case SDP_UUID128:
pElem = malloc(sizeof(uuid_t));
status = sdp_uuid_extract(p, bufsize, (uuid_t *) pElem, &localSeqLength);
- if (status < 0)
+ if (status < 0) {
+ free(pElem);
return -1;
+ }
seqlen += localSeqLength;
p += localSeqLength;
bufsize -= localSeqLength;