DEREF_OF_NULL.RET.ALLOC
Warning Message
Pointer '↦left[0]' returned from function 'g_strdup_printf' at tensor_filter.c:965 may be null, and it is dereferenced at tensor_filter.c:984.
Warning Message
Pointer '↦right[0]' returned from function 'g_strdup_printf' at tensor_filter.c:974 may be null, and it is dereferenced at tensor_filter.c:986.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
line =
g_strdup_printf ("%2d : %s | %s %s\n", i, left, right,
g_str_equal (left, right) ? "" : "FAILED");
- if (left[0] != '\0')
+ if (left && left[0] != '\0')
g_free (left);
- if (right[0] != '\0')
+ if (right && right[0] != '\0')
g_free (right);
tmp = g_strdup_printf ("%s%s", result, line);