libdlog limiter: safer pointer handling 40/184840/4
authorMichal Bloch <m.bloch@samsung.com>
Wed, 1 Aug 2018 17:34:12 +0000 (19:34 +0200)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 21 Aug 2018 02:50:01 +0000 (02:50 +0000)
commit85e2d9895c09b47ba6e34b418f5a77638ef91929
tree9fb894f8ed5c023591d60ff141edbc3a75dbae8e
parent3e1c46fab39b36b284c0de85639b43d26c735e93
libdlog limiter: safer pointer handling

The destructor functions now nullify the passed pointer.
This reduces some duplication but more importantly makes
sure there can be no double free.

Improve some precondition checks (asserts).

Change-Id: I21a443aebf6787c1903e971bc5fa5ad706a29612
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
src/libdlog/loglimiter.c