From 610f9ab43eb24b8e94d0067d2c785ab4fdc411dc Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 8 Sep 2011 12:02:26 +0200 Subject: Fix crash during error handling --- elf/dl-load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'elf') diff --git a/elf/dl-load.c b/elf/dl-load.c index e8d0401f24..b8a2659af1 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -888,7 +888,7 @@ lose (int code, int fd, const char *name, char *realname, struct link_map *l, /* The file might already be closed. */ if (fd != -1) (void) __close (fd); - if (l->l_origin != (char *) -1l) + if (l != NULL && l->l_origin != (char *) -1l) free (l->l_origin); free (l); free (realname); -- cgit v1.2.3