diff --git a/src/utils/FormatUtils.cpp b/src/utils/FormatUtils.cpp index e091505..90c5d1f 100644 --- a/src/utils/FormatUtils.cpp +++ b/src/utils/FormatUtils.cpp @@ -3,6 +3,8 @@ #include std::string fourccToName(uint32_t drmFormat) { - auto fmt = drmGetFormatName(drmFormat); - return fmt ? fmt : "unknown"; + auto fmt = drmGetFormatName(drmFormat); + std::string name = fmt ? fmt : "unknown"; + free(fmt); + return name; }