1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-08 05:01:46 +00:00

bdk: revert updating ini.c

This commit is contained in:
suchmememanyskill 2021-07-06 20:07:18 +02:00
parent 050e7e9ba2
commit ed072abb6b

View file

@ -66,14 +66,14 @@ ini_sec_t *_ini_create_section(link_t *dst, ini_sec_t *csec, char *name, u8 type
int ini_parse(link_t *dst, char *ini_path, bool is_dir) int ini_parse(link_t *dst, char *ini_path, bool is_dir)
{ {
FIL fp;
u32 lblen; u32 lblen;
u32 pathlen = strlen(ini_path); u32 pathlen = strlen(ini_path);
u32 k = 0; u32 k = 0;
char lbuf[512];
char *filelist = NULL;
FIL fp;
ini_sec_t *csec = NULL; ini_sec_t *csec = NULL;
char *lbuf = NULL;
char *filelist = NULL;
char *filename = (char *)malloc(256); char *filename = (char *)malloc(256);
strcpy(filename, ini_path); strcpy(filename, ini_path);
@ -114,7 +114,8 @@ int ini_parse(link_t *dst, char *ini_path, bool is_dir)
return 0; return 0;
} }
lbuf = malloc(512); csec = _ini_create_section(dst, csec, "Unknown", INI_CHOICE);
list_init(&csec->kvs);
do do
{ {
@ -170,7 +171,6 @@ int ini_parse(link_t *dst, char *ini_path, bool is_dir)
} }
} while (is_dir); } while (is_dir);
free(lbuf);
free(filename); free(filename);
free(filelist); free(filelist);