diff options
author | markj <markj@FreeBSD.org> | 2014-08-24 17:02:27 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2014-08-24 17:02:27 +0000 |
commit | b7ae83282f2a14f984959709a4455542ce5e7270 (patch) | |
tree | 2565b4c9727b193fccc98ab650c8571a7ca68f88 /lib/libproc | |
parent | 4a9e0dc25b631a6de97536a8adf36060e9bed33f (diff) | |
download | FreeBSD-src-b7ae83282f2a14f984959709a4455542ce5e7270.zip FreeBSD-src-b7ae83282f2a14f984959709a4455542ce5e7270.tar.gz |
Fix a bug in r265255: only return NULL if the requested map wasn't found.
Submitted by: Luke Chang-Hsien Tsai <luke.tw@gmail.com>
MFC after: 1 week
Diffstat (limited to 'lib/libproc')
-rw-r--r-- | lib/libproc/proc_sym.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libproc/proc_sym.c b/lib/libproc/proc_sym.c index e1776a4..aa879ec 100644 --- a/lib/libproc/proc_sym.c +++ b/lib/libproc/proc_sym.c @@ -121,10 +121,12 @@ proc_obj2map(struct proc_handle *p, const char *objname) break; } } - if (rdl == NULL && strcmp(objname, "a.out") == 0 && p->rdexec != NULL) - rdl = p->rdexec; - else - return (NULL); + if (rdl == NULL) { + if (strcmp(objname, "a.out") == 0 && p->rdexec != NULL) + rdl = p->rdexec; + else + return (NULL); + } if ((map = malloc(sizeof(*map))) == NULL) return (NULL); |