Fix memory handling of pid2name result

This plugs a leak.
diff --git a/ltrace-elf.c b/ltrace-elf.c
index 020159c..ce7fd3d 100644
--- a/ltrace-elf.c
+++ b/ltrace-elf.c
@@ -959,11 +959,14 @@
 	 * that.  Presumably we could read the DSOs from the process
 	 * memory image, but that's not currently done.  */
 	char *fname = pid2name(proc->pid);
+	if (fname == NULL)
+		return NULL;
 	if (read_module(lib, proc, fname, 0, 1) < 0) {
 		library_destroy(lib);
 		free(lib);
 		return NULL;
 	}
+	free(fname);
 
 	return lib;
 }