diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-01-16 11:22:01 +0200 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-01-16 11:22:01 +0200 | 
| commit | b5fe14e46c4351fe582f009de2f0b6d6834566e5 (patch) | |
| tree | 3fc45a48b7a6afa0de0eb0d92070bfd4eeec94d2 | |
| parent | 6a071bd0026898a3f43074280b1004e8f0aea2e4 (diff) | |
Fix memory leak
| -rw-r--r-- | src/sdpd-request.c | 4 | 
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;  | 
