Mercurial > repos > blastem
comparison config.c @ 1593:24508cb54f87
Fix a number of other memory errors (mostly leaks again) identified by valgrind
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 28 Jun 2018 09:27:05 -0700 |
parents | 6ce36c3f250b |
children | 1fc61c844ec5 |
comparison
equal
deleted
inserted
replaced
1592:31effaadf877 | 1593:24508cb54f87 |
---|---|
196 return 0; | 196 return 0; |
197 } | 197 } |
198 uint32_t buf_size; | 198 uint32_t buf_size; |
199 char *buffer = serialize_config(config, &buf_size); | 199 char *buffer = serialize_config(config, &buf_size); |
200 uint8_t ret = buf_size == fwrite(buffer, 1, buf_size, f); | 200 uint8_t ret = buf_size == fwrite(buffer, 1, buf_size, f); |
201 free(buffer); | |
201 fclose(f); | 202 fclose(f); |
202 return ret; | 203 return ret; |
203 } | 204 } |
204 | 205 |
205 tern_node *parse_bundled_config(char *config_name) | 206 tern_node *parse_bundled_config(char *config_name) |