Fix: Malloc only when making process entry in tree 16/179616/1 accepted/tizen/unified/20180521.003651 submit/tizen/20180521.000329
authorNishant Chaprana <n.chaprana@samsung.com>
Fri, 18 May 2018 14:48:09 +0000 (20:18 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Fri, 18 May 2018 14:48:09 +0000 (20:18 +0530)
commitccdf22a5861f7ce5b4b72810c03e632e1e2e5e92
treec77d056dd52fd78a0b3dd3fe8c79000429c19a7b
parentba9186f949073543fcecf5f1d517a21b5141e7f0
Fix: Malloc only when making process entry in tree

Description:
For some processes both FORK and EXEC events are emitted, however
we were allocating mamory in both methods, but not unallocating the
memory in failure case when entry was already present.

So we should malloc only when we are creating an entry in process tree.

Change-Id: Iedc3c10eabb41ad4da854ab8d0cf45759bbedcc7
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/stc-manager.spec
plugin/procfs/stc-plugin-procfs.c