diff options
author | mattias <mattias@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2017-05-17 22:57:36 +0000 |
---|---|---|
committer | mattias <mattias@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2017-05-17 22:57:36 +0000 |
commit | 108550aaf35dc7f44bf42706ec2fa80922ee44d4 (patch) | |
tree | 164252a3465e425f12ebe4d36c4e1a0a40dee6f0 /packages/fcl-passrc/examples | |
parent | d61927bff6cb0338cad78588078148977222b24b (diff) | |
download | fpc-108550aaf35dc7f44bf42706ec2fa80922ee44d4.tar.gz |
fcl-passrc: examples: parsepp: fixed freeing module
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@36237 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-passrc/examples')
-rw-r--r-- | packages/fcl-passrc/examples/parsepp.pp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/fcl-passrc/examples/parsepp.pp b/packages/fcl-passrc/examples/parsepp.pp index 5d80ec300e..3a6e3fbf4c 100644 --- a/packages/fcl-passrc/examples/parsepp.pp +++ b/packages/fcl-passrc/examples/parsepp.pp @@ -62,6 +62,7 @@ begin For I:=1 to ParamCount do CmdLine:=CmdLine+' '+Paramstr(i); E := TSimpleEngine.Create; + M := nil; try M := ParseSource(E, cmdline, 'linux', 'i386'); @@ -84,6 +85,8 @@ begin (TObject(Decls[I]) as TPasElement).Name); end; + finally FreeAndNil(M); - finally FreeAndNil(E) end; + FreeAndNil(E) + end; end. |