From 312d0fc22d32171b5b2f6cf5272b11784888dfbe Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 19 Apr 2015 17:14:59 +0200 Subject: [PATCH] instance: avoid dumping invalid service instances - prevents a potential crash Signed-off-by: Felix Fietkau --- service/instance.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/instance.c b/service/instance.c index f5b61fa..1fb65fa 100644 --- a/service/instance.c +++ b/service/instance.c @@ -871,6 +871,9 @@ void instance_dump(struct blob_buf *b, struct service_instance *in, int verbose) { void *i; + if (!in->valid) + return; + i = blobmsg_open_table(b, in->name); blobmsg_add_u8(b, "running", in->proc.pending); if (in->proc.pending) -- 2.25.1