aboutsummaryrefslogtreecommitdiffstats
path: root/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/memory.c b/memory.c
index 1af854f..c721268 100644
--- a/memory.c
+++ b/memory.c
@@ -22,6 +22,7 @@ get_string(pid_t pid, unsigned long int addr, size_t *lenp, const char **errorp)
if (process_vm_readv(pid, &outv, 1, &inv, 1, 0) != (ssize_t)read_size) {
*errorp = errno == EFAULT ? "<invalid address>" : "<an error occured during reading of string>";
*lenp = 0;
+ free(out);
return 0;
}
p = memchr(&out[off], 0, read_size);