Skip to content

Commit

Permalink
Merge pull request #351 from peter15914/fix_no_va_end
Browse files Browse the repository at this point in the history
Add missing va_end() call
  • Loading branch information
Syllo authored Jan 19, 2025
2 parents 3e8c6ae + 7d8ad68 commit f901275
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extract_gpuinfo_amdgpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,10 @@ static int readAttributeFromDevice(nvtop_device *dev, const char *sysAttr, const
va_start(args, format);
const char *val;
int ret = nvtop_device_get_sysattr_value(dev, sysAttr, &val);
if (ret < 0)
if (ret < 0) {
va_end(args);
return ret;
}
// Read the pattern
int nread = vsscanf(val, format, args);
va_end(args);
Expand Down

0 comments on commit f901275

Please sign in to comment.