diff options
author | Roland McGrath <[email protected]> | 2011-11-05 20:58:14 -0700 |
---|---|---|
committer | Roland McGrath <[email protected]> | 2011-11-05 20:58:14 -0700 |
commit | 4fa988e13d09465b8ae4f605333fabf39d50fd30 (patch) | |
tree | 428f3e9df05fe74805c507c70a1debf80356e0f1 /src/ar.c | |
parent | ef431cd30b8a1a6b12a8783516fc95da88a9a636 (diff) |
ar: Fix a return value check.
Diffstat (limited to 'src/ar.c')
-rw-r--r-- | src/ar.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1302,7 +1302,8 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc, found[cnt]->name = bname; found[cnt]->mem = elf_rawfile (newelf, &found[cnt]->size); - if (found[cnt] == NULL || elf_cntl (newelf, ELF_C_FDDONE) != 0) + if (found[cnt]->mem == NULL + || elf_cntl (newelf, ELF_C_FDDONE) != 0) error (EXIT_FAILURE, 0, gettext ("cannot read %s: %s"), argv[cnt], elf_errmsg (-1)); |