diff --git a/src/detection/temps.c b/src/detection/temps.c index d31198e48..a566a9c41 100644 --- a/src/detection/temps.c +++ b/src/detection/temps.c @@ -88,6 +88,7 @@ const FFTempsResult* ffDetectTemps() DIR* dirp = opendir(baseDir.chars); if(dirp == NULL) { + ffStrbufDestroy(&baseDir); pthread_mutex_unlock(&mutex); return &result; } @@ -114,6 +115,9 @@ const FFTempsResult* ffDetectTemps() ffStrbufSubstrBefore(&baseDir, baseDirLength); } + closedir(dirp); + ffStrbufDestroy(&baseDir); + pthread_mutex_unlock(&mutex); return &result; } diff --git a/src/modules/cpu.c b/src/modules/cpu.c index e7566f63a..6eb6293aa 100644 --- a/src/modules/cpu.c +++ b/src/modules/cpu.c @@ -48,4 +48,6 @@ void ffPrintCPU(FFinstance* instance) {FF_FORMAT_ARG_TYPE_DOUBLE, &cpu->frequencyMax}, {FF_FORMAT_ARG_TYPE_DOUBLE, &cpu->temperature} }); + + ffStrbufDestroy(&output); } diff --git a/src/modules/host.c b/src/modules/host.c index d40bb54b4..1a5b8dae6 100644 --- a/src/modules/host.c +++ b/src/modules/host.c @@ -50,4 +50,6 @@ void ffPrintHost(FFinstance* instance) {FF_FORMAT_ARG_TYPE_STRBUF, &host->chassisVersion}, {FF_FORMAT_ARG_TYPE_STRBUF, &host->sysVendor} }); + + ffStrbufDestroy(&output); } diff --git a/src/modules/player.c b/src/modules/player.c index 41bada220..affdb3765 100644 --- a/src/modules/player.c +++ b/src/modules/player.c @@ -66,4 +66,6 @@ void ffPrintPlayer(FFinstance* instance) {FF_FORMAT_ARG_TYPE_STRBUF, &media->url} }); } + + ffStrbufDestroy(&playerPretty); } diff --git a/src/modules/song.c b/src/modules/song.c index 97d23804c..4d093d894 100644 --- a/src/modules/song.c +++ b/src/modules/song.c @@ -100,4 +100,6 @@ void ffPrintSong(FFinstance* instance) {FF_FORMAT_ARG_TYPE_STRBUF, &media->album} }); } + + ffStrbufDestroy(&songPretty); }