Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
config: fix the s1 string handling (coverity)
  • Loading branch information
perexg committed Oct 3, 2014
1 parent 3b5f981 commit be55658
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/config.c
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit be55658

Please sign in to comment.