Coverity CID 2785: Fix memory leak.

This commit is contained in:
christos 2006-03-29 15:53:20 +00:00
parent c4378122a1
commit 391f06d4af
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dbsym.c,v 1.11 2006/03/26 23:00:35 christos Exp $ */
/* $NetBSD: dbsym.c,v 1.12 2006/03/29 15:53:20 christos Exp $ */
/*
* Copyright (c) 2001 Simon Burge (for Wasabi Systems)
@ -39,7 +39,7 @@
__COPYRIGHT(
"@(#) Copyright (c) 1996 Christopher G. Demetriou, 2001 Simon Burge.\
All rights reserved.\n");
__RCSID("$NetBSD: dbsym.c,v 1.11 2006/03/26 23:00:35 christos Exp $");
__RCSID("$NetBSD: dbsym.c,v 1.12 2006/03/29 15:53:20 christos Exp $");
#endif /* not lint */
#include <sys/param.h>
@ -450,6 +450,7 @@ load_symtab(bfd *abfd, int fd, char **symtab, u_int32_t *symtabsize)
}
memcpy(*symtab, &ehdr, sizeof(ehdr));
free(shdr);
return (0);
out:
free(shdr);