Skip to content

Commit

Permalink
chore: remove unnecessary NULL checks
Browse files Browse the repository at this point in the history
Fix #1494
  • Loading branch information
CarterLi committed Jan 10, 2025
1 parent 8c227ae commit 1bc41df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/detection/diskio/diskio_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options)
device->writeCount = current->num_writes;
}

if (stats.dinfo->mem_ptr)
free(stats.dinfo->mem_ptr);
free(stats.dinfo->mem_ptr);
free(stats.dinfo);

return NULL;
Expand Down
3 changes: 1 addition & 2 deletions src/detection/gtk_qt/qt.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ static bool detectPlasmaFromFile(const char* filename, FFQtResult* result)
}
}

if(line != NULL)
free(line);
free(line);

fclose(kdeglobals);

Expand Down

0 comments on commit 1bc41df

Please sign in to comment.