Avoid use after free, reported by the coverity scanner.
This commit is contained in:
parent
e26b626982
commit
2782e828f4
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: map_object.c,v 1.52 2013/08/03 13:17:05 skrll Exp $ */
|
||||
/* $NetBSD: map_object.c,v 1.53 2014/10/30 07:53:41 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1996 John D. Polstra.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: map_object.c,v 1.52 2013/08/03 13:17:05 skrll Exp $");
|
||||
__RCSID("$NetBSD: map_object.c,v 1.53 2014/10/30 07:53:41 martin Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -442,10 +442,10 @@ _rtld_obj_free(Obj_Entry *obj)
|
|||
}
|
||||
if (!obj->phdr_loaded)
|
||||
xfree((void *)(uintptr_t)obj->phdr);
|
||||
xfree(obj);
|
||||
#ifdef COMBRELOC
|
||||
_rtld_combreloc_reset(obj);
|
||||
#endif
|
||||
xfree(obj);
|
||||
}
|
||||
|
||||
Obj_Entry *
|
||||
|
|
Loading…
Reference in New Issue