config: fix the s1 string handling (coverity)
This commit is contained in:
parent
3b5f981364
commit
be55658b02
1 changed files with 8 additions and 5 deletions
13
src/config.c
13
src/config.c
|
@ -787,12 +787,15 @@ config_modify_dvr_log( htsmsg_t *c, uint32_t id, const char *uuid, const void *a
|
|||
if ((s1 = htsmsg_get_str(c, "autorec")) != NULL) {
|
||||
s1 = strdup(s1);
|
||||
htsmsg_delete_field(c, "autorec");
|
||||
HTSMSG_FOREACH(f, list) {
|
||||
if (!(e = htsmsg_field_get_map(f))) continue;
|
||||
if (strcmp(s1, htsmsg_get_str(e, "id") ?: "") == 0) {
|
||||
htsmsg_add_str(c, "autorec", htsmsg_get_str(e, "uuid"));
|
||||
break;
|
||||
if (s1 != NULL) {
|
||||
HTSMSG_FOREACH(f, list) {
|
||||
if (!(e = htsmsg_field_get_map(f))) continue;
|
||||
if (strcmp(s1, htsmsg_get_str(e, "id") ?: "") == 0) {
|
||||
htsmsg_add_str(c, "autorec", htsmsg_get_str(e, "uuid"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
free((char *)s1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue