LLNL / UnifyFS

UnifyFS: A file system for burst buffers
Other
99 stars 31 forks source link

fix: remove potential double free #787

Closed adammoody closed 1 year ago

adammoody commented 1 year ago

Building with a newer gcc detected this potential variable use after a free().

We don't need this free() call at line 265 during error handling since the memory has already been freed just after the memcpy() at line 247.

https://github.com/LLNL/UnifyFS/blob/ffe0a965e0ba286b839ff622153eb9ee901f6819/server/src/unifyfs_group_rpc.c#L245-L267

Types of changes

Checklist:

wangvsa commented 1 year ago

I noticed the same error on Frontier with gcc 12.

adammoody commented 1 year ago

Thanks @wangvsa .