mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-04 19:00:09 +00:00
gaiconf_init: Avoid double-free in label and precedence lists
labellist and precedencelist could get freed a second time if there
are allocation failures, so set them to NULL to avoid a double-free.
Reviewed-by: Arjun Shankar <arjun@redhat.com>
(cherry picked from commit 77a34079d8
)
This commit is contained in:
parent
3a48da47a9
commit
a5bd2e10e0
@ -2008,6 +2008,7 @@ gaiconf_init (void)
|
||||
l = l->next;
|
||||
}
|
||||
free_prefixlist (labellist);
|
||||
labellist = NULL;
|
||||
|
||||
/* Sort the entries so that the most specific ones are at
|
||||
the beginning. */
|
||||
@ -2046,6 +2047,7 @@ gaiconf_init (void)
|
||||
l = l->next;
|
||||
}
|
||||
free_prefixlist (precedencelist);
|
||||
precedencelist = NULL;
|
||||
|
||||
/* Sort the entries so that the most specific ones are at
|
||||
the beginning. */
|
||||
|
Loading…
Reference in New Issue
Block a user