Plug possible memory leak.

Found by:  Coverity
MFC after: 2 weeks
This commit is contained in:
Alexander Kabaev 2010-06-03 00:25:43 +00:00
parent 2d8f84cbea
commit f28c411c0c

View File

@ -1530,8 +1530,10 @@ load_object(const char *name, const Obj_Entry *refobj, int flags)
close(fd);
return obj;
}
if (flags & RTLD_LO_NOLOAD)
if (flags & RTLD_LO_NOLOAD) {
free(path);
return (NULL);
}
/* First use of this object, so we must map it in */
obj = do_load_object(fd, name, path, &sb, flags);