commit | 1d42b3ea7ebe64c02a156043e2b3adc92458daac | [log] [download] |
---|---|---|
author | Alfred Klomp <git@alfredklomp.com> | Mon Jul 14 22:09:21 2014 +0200 |
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Thu Aug 14 11:34:34 2014 +0200 |
tree | 2e6b06e10b800ced03f51bc67927294b2268180b | |
parent | 1b4eda3af96a7fb53a327fb3325670a14ff02213 [diff] |
pem2der.c: fix double-free bug Found with Clang's `scan-build` tool. load_file() allocates memory to a char** parameter. It then tries to fread() a file, and if that fails, frees the memory and returns to caller. However, the char** is not reset to NULL, which causes a double-free error when the caller later passes it to free().