X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fmm_camcorder_attribute.c;h=409aba4fe82330dd0e88839b8f1208d5bef6575d;hb=341e039008477fd99eb9202e898d479869af27a2;hp=a5a88e4072695f426ad3a630c32ac38ce2f4b90a;hpb=14ac398e0d968d39de2693cbb1383e27dd85d054;p=platform%2Fcore%2Fmultimedia%2Flibmm-camcorder.git diff --git a/src/mm_camcorder_attribute.c b/src/mm_camcorder_attribute.c index a5a88e4..409aba4 100644 --- a/src/mm_camcorder_attribute.c +++ b/src/mm_camcorder_attribute.c @@ -2955,11 +2955,8 @@ bool _mmcamcorder_commit_target_filename(MMHandleType handle, int attr_idx, cons } if (sc->info_video) { - if (sc->info_video->filename) { - free(sc->info_video->filename); - sc->info_video->filename = NULL; - } - sc->info_video->filename = strdup(filename); + SAFE_G_FREE(sc->info_video->filename); + sc->info_video->filename = g_strdup(filename); if (sc->info_video->filename == NULL) { _mmcam_dbg_err("failed to strdup filename [%s]", filename); return FALSE;