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 06d1e90bac.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-04-26 09:23:59 +02:00
parent 5ea3cc0090
commit 80624d3ff8
+1 -3
View File
@@ -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;
}