Commit b7bb974
committed
authkeys: Avoid double free
If any code after the first fclose(f) in Key::Parse() throws
an exception, the exception handler will unconditionally
call fclose(f) again.
Fix this by setting f to NULL after the first fclose, and
checking the value of f against NULL in the excepton handler.
Signed-off-by: Wolfgang Wallner <[email protected]>1 parent 7b68e60 commit b7bb974
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
| |||
0 commit comments