ret = ms_check_scan_ignore(current_path, uid);
if (ret != MS_MEDIA_ERR_NONE) {
MS_DBG_SERR("%s is ignore", current_path);
- g_free(current_path);
+ MS_SAFE_FREE(current_path);
if (ret == MS_MEDIA_ERR_USB_UNMOUNTED)
goto STOP_SCAN;
else
MS_DBG_ERR("stop folder scan...");
ms_insert_folder_end(uid);
ms_set_folder_scan_status(handle, storage_id, current_path, MS_DIR_SCAN_STOP, uid);
+ MS_SAFE_FREE(current_path);
END_SCAN:
if (fd != -1) {
ms_insert_folder_end(uid);
if (current_path != NULL)
ms_set_folder_scan_status(handle, storage_id, current_path, MS_DIR_SCAN_STOP, uid);
+ MS_SAFE_FREE(current_path);
EXIT: