9fans / plan9port

Plan 9 from User Space
https://9fans.github.io/plan9port/
Other
1.64k stars 326 forks source link

devdraw, libdraw: fix memory leaks by freeing getns() malloced string #431

Closed 1g0rb0hm closed 4 years ago

1g0rb0hm commented 4 years ago

getns() returns a pointer to a malloced string. In some cases that malloced string was not freed causing memory leaks.

rsc commented 4 years ago

It's hard to worry too much about tiny startup-time memory leaks (as opposed to ongoing one that leak an arbitrary amount of data), but sure this seems OK.

1g0rb0hm commented 4 years ago

It's hard to worry too much about tiny startup-time memory leaks (as opposed to ongoing one that leak an arbitrary amount of data), but sure this seems OK.

Agree.

Trying to reduce the number of Coverity issues to make it easier to spot new ones.

Thanks for merging.