From 80624d3ff8b67239c323685bc570db9a4adbbe7d Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 26 Apr 2016 09:23:59 +0200 Subject: [PATCH] Revert "Do not just mark deleted SVC free, clear memory" We cannot clear the svc_t memory because other applications may have connected to the same shared memory. An application may be inspecting the current list of services (initctl) and pulling the rug from under them could cause some really unpredicatble results. This reverts commit 06d1e90bacff9a1b3a97d100b725459ff50db6f5. Signed-off-by: Joachim Nilsson --- svc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/svc.c b/svc.c index 631da95f..fb241b22 100644 --- a/svc.c +++ b/svc.c @@ -97,9 +97,7 @@ svc_t *svc_new(char *cmd, int id, int type) */ int svc_del(svc_t *svc) { - /* Clear any old references and set SVC_TYPE_FREE */ - memset(svc, 0, sizeof(*svc)); - + svc->type = SVC_TYPE_FREE; return 0; }