dma icon indicating copy to clipboard operation
dma copied to clipboard

Fix a memory leak in set_from()

Open ian-abbott opened this issue 2 years ago • 3 comments

Free the allocated 'sender' string when returning NULL on error.

ian-abbott avatar Jan 04 '23 17:01 ian-abbott

I don't think this is necessary. Failing set_from will terminate the process right after.

corecode avatar Jan 04 '23 18:01 corecode

IMO changes like this are reasonable even if only to silence potential warnings from static analysis tools.

emaste avatar Jan 04 '23 19:01 emaste

fair enough, but all of dma is written with this idiom. It simplifies a lot of code.

corecode avatar Jan 04 '23 19:01 corecode