oids.c: fix a memory leak in oid_string2subid()

Bug: 14485
Change-Id: Ia0ccd4480808c4f5da228975c7a076cd3f5d332b
Reviewed-on: https://code.wireshark.org/review/26290
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Pascal Quantin 2018-03-06 22:15:22 +01:00 committed by Anders Broman
parent fd62e506b9
commit f46d129f21
1 changed files with 1 additions and 0 deletions

View File

@ -937,6 +937,7 @@ guint oid_string2subid(wmem_allocator_t *scope, const char* str, guint32** subid
subid += *r - '0';
if( subids >= subids_overflow || subid > 0xffffffff) {
wmem_free(scope, *subids_p);
*subids_p=NULL;
return 0;
}