From: Duna Oh Date: Fri, 11 Feb 2022 05:03:56 +0000 (+0900) Subject: quirks.c: Fix a coverity warning of potential NULL dereferences X-Git-Tag: submit/tizen/20220211.064101^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_work_20220207;p=platform%2Fupstream%2Flibinput.git quirks.c: Fix a coverity warning of potential NULL dereferences --- diff --git a/src/quirks.c b/src/quirks.c index fb49c29a..56214b57 100644 --- a/src/quirks.c +++ b/src/quirks.c @@ -813,7 +813,7 @@ parse_value_line(struct quirks_context *ctx, struct section *s, const char *line bool rc = false; strv = strv_from_string(line, "="); - if (strv[0] == NULL || strv[1] == NULL || strv[2] != NULL) { + if (!strv || strv[0] == NULL || strv[1] == NULL || strv[2] != NULL) { goto out; }