]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvr: coverity - fix dvr_entry_class_channel_name_set()
authorJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 16:49:15 +0000 (18:49 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 16:49:15 +0000 (18:49 +0200)
src/dvr/dvr_db.c

index ff78b2584ebaa3fa4cb5a3daa697488fb4c3f567..2d45d94604dd2d09a36b5d058f16e3544650aa51 100644 (file)
@@ -1263,7 +1263,7 @@ dvr_entry_class_channel_name_set(void *o, const void *v)
     return dvr_entry_class_channel_set(o, idnode_uuid_as_str(&ch->ch_id));
   } else {
     free(de->de_channel_name);
-    de->de_channel_name = strdup(v);
+    de->de_channel_name = v ? strdup(v) : NULL;
     return 1;
   }
 }