Skip to content

Commit

Permalink
MAINT: PR 819 revisions
Browse files Browse the repository at this point in the history
* drop some spurious `free()` usages for cases where
`darshan_log_get_record()` hasn't `malloc`'d anything
  • Loading branch information
tylerjereddy committed Sep 23, 2022
1 parent 9d97ddd commit 3f0647d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions darshan-util/pydarshan/darshan/backend/cffi_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ def log_get_generic_record(log, mod_name, dtype='numpy'):
buf = ffi.new("void **")
r = libdutil.darshan_log_get_record(log['handle'], modules[mod_name]['idx'], buf)
if r < 1:
libdutil.darshan_free(buf[0])
return None
rbuf = ffi.cast(mod_type, buf)

Expand Down Expand Up @@ -463,7 +462,6 @@ def _log_get_lustre_record(log, dtype='numpy'):
buf = ffi.new("void **")
r = libdutil.darshan_log_get_record(log['handle'], modules['LUSTRE']['idx'], buf)
if r < 1:
libdutil.darshan_free(buf[0])
return None
rbuf = ffi.cast("struct darshan_lustre_record **", buf)

Expand Down Expand Up @@ -550,7 +548,6 @@ def log_get_dxt_record(log, mod_name, reads=True, writes=True, dtype='dict'):
buf = ffi.new("void **")
r = libdutil.darshan_log_get_record(log['handle'], modules[mod_name]['idx'], buf)
if r < 1:
libdutil.darshan_free(buf[0])
return None
filerec = ffi.cast(mod_type, buf)

Expand Down

0 comments on commit 3f0647d

Please sign in to comment.