- Timestamp:
- Aug 31, 2021, 1:49:10 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
- Children:
- cac1d52
- Parents:
- 5241ec2
- git-author:
- Jacob Prud'homme <jafprudhomme@…> (08/06/21 03:03:42)
- git-committer:
- Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/parseconfig.cfa
r5241ec2 r4bdb7bf 91 91 } // for 92 92 } catch( Open_Failure * ex; ex->istream == &in ) { 93 ^(*kv_pairs){};93 delete( kv_pairs ); 94 94 exit | "Error: could not open input file '" | config_file | "'"; 95 95 // HERE (unfreed storage) … … 124 124 // Validate the parsed data, if necessary 125 125 if ( entries[j].validate != (bool (*)(void *))0p ) { 126 if ( !entries[j].validate( entries[j].variable ) ) throw (Validation_Failure){ entries[j] }; // HERE (segfaults on throw) 126 if ( !entries[j].validate( entries[j].variable ) ) { 127 delete( kv_pairs ); 128 throw (Validation_Failure){ entries[j] }; 129 } 127 130 } 128 131 … … 134 137 } 135 138 136 ^(*kv_pairs){}; 137 // HERE (unfreed storage) 139 delete( kv_pairs ); 138 140 } // processConfigFile 139 141
Note: See TracChangeset
for help on using the changeset viewer.