Author: kan
Date: Thu Jun 3 00:25:43 2010
New Revision: 208763
URL: http://svn.freebsd.org/changeset/base/208763
Log:
Plug possible memory leak.
Found by: Coverity
MFC after: 2 weeks
Modified:
head/libexec/rtld-elf/rtld.c
Modified: head/libexec/rtld-elf/rtld.c
==============================================================================
--- head/libexec/rtld-elf/rtld.c Thu Jun 3 00:00:45 2010
(r208762)
+++ head/libexec/rtld-elf/rtld.c Thu Jun 3 00:25:43 2010
(r208763)
@@ -1530,8 +1530,10 @@ load_object(const char *name, const Obj_
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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"