gobex: Fix read from pointer after free
authorTedd Ho-Jeong An <tedd.an@intel.com>
Fri, 18 Feb 2022 19:46:17 +0000 (11:46 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:53 +0000 (14:55 +0530)
commitbb3bb108605b26570963aba391fa808ca49d594a
treeec28527cf217573d90d199e95eea30e619c57686
parent5618f18556b1845ddbb2e3ca2250521b56be9956
gobex: Fix read from pointer after free

This patch sets the pointer to null after free since the g_free(p)
doesn't set the pointer to NULL.

This is reported by the Coverity.

Fixes: 7e7d826aa1db ("gobex: Print error if data cannot be written")
Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
gobex/gobex.c