Created attachment 116296 [details] This is patch file attached to fix the issue. After freeing any pointer which is pointing to dynamically allocated memory, Null should be assigned to pointer immediately after freeing to avoid dangling pointer situation. In the code after freeing the memory under some condition null was not assigned to the pointer and outside the condition block it was getting assigned to another pointer.
Accessing the pointer after the function returns an error is a much more severe error. Better style is not to touch out parameters along error paths.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.