From: jsg Date: Wed, 6 May 2015 01:03:31 +0000 (+0000) Subject: Fix a memory leak in _dl_load_dep_libs() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=42d12061133ab44d6c0e472de511a0f2e6b3ccaa;p=openbsd Fix a memory leak in _dl_load_dep_libs() ok otto@ guenther@ --- diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c index 4d79ee2f5a5..31b0c15c3d5 100644 --- a/libexec/ld.so/loader.c +++ b/libexec/ld.so/loader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loader.c,v 1.153 2015/01/22 05:48:17 deraadt Exp $ */ +/* $OpenBSD: loader.c,v 1.154 2015/05/06 01:03:31 jsg Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -326,6 +326,7 @@ _dl_load_dep_libs(elf_object_t *object, int flags, int booting) DL_DEB(("dlopen: failed to open %s\n", libname)); _dl_free(liblist); + _dl_free(randomlist); return (1); } } @@ -337,6 +338,7 @@ _dl_load_dep_libs(elf_object_t *object, int flags, int booting) _dl_link_child(liblist[loop].depobj, dynobj); } _dl_free(liblist); + _dl_free(randomlist); } dynobj = dynobj->next; }