From: Michael Orlitzky Date: Fri, 26 Jan 2024 12:17:39 +0000 (-0500) Subject: src/svgtiny_css.c: initialize an attr_val pointer to NULL X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;ds=sidebyside;h=9be0e02afb4bd161a132d8ea98c0541a81189324;p=libsvgtiny.git src/svgtiny_css.c: initialize an attr_val pointer to NULL We later compare it to NULL, and valgrind says that it's potentially uninitialized at that point, so let's initialize it. --- diff --git a/src/svgtiny_css.c b/src/svgtiny_css.c index 968ea24..495a39f 100644 --- a/src/svgtiny_css.c +++ b/src/svgtiny_css.c @@ -1203,7 +1203,7 @@ static css_error _node_has_attribute_substring(void *pw, void *node, { UNUSED(pw); dom_string *name; - dom_string *attr_val; + dom_string *attr_val = NULL; dom_exception err; size_t attr_len; /* length of attr_val */ size_t substrlen; /* length of "substring" */