summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/shm_rdrbuff.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/shm_rdrbuff.c b/src/lib/shm_rdrbuff.c
index 12e29bef..bbad361a 100644
--- a/src/lib/shm_rdrbuff.c
+++ b/src/lib/shm_rdrbuff.c
@@ -148,8 +148,10 @@ void shm_rdrbuff_destroy(struct shm_rdrbuff * rdrb)
assert(rdrb);
- if (getpid() != *rdrb->pid && kill(*rdrb->pid, 0) == 0)
+ if (getpid() != *rdrb->pid && kill(*rdrb->pid, 0) == 0) {
+ free(rdrb);
return;
+ }
shm_rdrbuff_close(rdrb);
@@ -275,7 +277,7 @@ struct shm_rdrbuff * shm_rdrbuff_create()
fail_mattr:
shm_rdrbuff_destroy(rdrb);
fail_rdrb:
- return NULL;
+ return NULL;
}
struct shm_rdrbuff * shm_rdrbuff_open()