Commit 0c975f60 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

NULL the pointer first, then destroy VSM segment.

parent cf6c5c65
......@@ -216,10 +216,12 @@ class vscset(object):
fo.write("VSC_" + self.name + "_Destroy")
fo.write("(" + self.struct + " **pp)\n")
fo.write("{\n")
fo.write("\t" + self.struct + "*p;\n")
fo.write("\n")
fo.write("\tAN(pp);\n")
fo.write('\tVRT_VSC_Destroy(vsc_%s_name, *pp);\n' % self.name)
fo.write("\tp = *pp;\n")
fo.write("\t*pp = NULL;\n")
fo.write('\tVRT_VSC_Destroy(vsc_%s_name, p);\n' % self.name)
fo.write("}\n")
if 'sumfunction' in self.head.param:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment