summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_function.cpp
diff options
context:
space:
mode:
authorAlistair Leslie-Hughes <leslie_alistair@hotmail.com>2024-03-26 13:13:43 +1100
committerAlistair Leslie-Hughes <leslie_alistair@hotmail.com>2024-04-05 09:13:27 +1100
commit767bfec8b63bf88151f27e2fa00f5bd363be6091 (patch)
tree7861430f67c766a270af37fab75e7d8a00dfedf1 /modules/gdscript/gdscript_function.cpp
parent79de2eaae7fb3bb8f13031ac2ec9b19128b6f471 (diff)
downloadredot-engine-767bfec8b63bf88151f27e2fa00f5bd363be6091.tar.gz
Use local variable to stop memory leak.
I've change the urls variable to be a local, instead of manually allocating it all the time. This is only used locally and was causing a memory leak because FreeUPNPUrls gave the impression it free it. 1. FreeUPNPUrls doesn't free the pointer passed in, that's up to caller. 2. The second if(!urls) produced dead code as we checked the pointer just after allocation.
Diffstat (limited to 'modules/gdscript/gdscript_function.cpp')
0 files changed, 0 insertions, 0 deletions