Fix possible memory leak.

This commit is contained in:
Luiz Augusto von Dentz 2009-07-16 10:21:50 -03:00
parent 135e87fb2f
commit f008103206

View File

@ -3157,8 +3157,10 @@ static int gen_dataseq_pdu(uint8_t *dst, const sdp_list_t *seq, uint8_t dtd)
return -ENOMEM;
values = malloc(seqlen * sizeof(void *));
if (!values)
if (!values) {
free(types);
return -ENOMEM;
}
for (i = 0; i < seqlen; i++) {
void *data = seq->data;