@@ -529,6 +529,7 @@ bool ffSettingsGetEnlightenmentProperty(ffEnlightenmentSettings* result) {
529529 FF_LIBRARY_LOAD_SYMBOL (libeet , eet_data_descriptor_file_new , false);
530530 FF_LIBRARY_LOAD_SYMBOL (libeet , eet_data_read , false);
531531 FF_LIBRARY_LOAD_SYMBOL (libeet , eet_close , false);
532+ FF_LIBRARY_LOAD_SYMBOL (libeet , eet_shutdown , false);
532533 FF_LIBRARY_LOAD_SYMBOL (libeet , eet_data_descriptor_free , false);
533534 FF_LIBRARY_LOAD_SYMBOL (libeet , eet_eina_file_data_descriptor_class_set , false);
534535 FF_LIBRARY_LOAD_SYMBOL (libeet , eet_data_descriptor_element_add , false);
@@ -542,6 +543,7 @@ bool ffSettingsGetEnlightenmentProperty(ffEnlightenmentSettings* result) {
542543
543544 Eet_File * ef = ffeet_open (fileName .chars , EET_FILE_MODE_READ );
544545 if (!ef ) {
546+ ffeet_shutdown ();
545547 return false;
546548 }
547549
@@ -550,6 +552,7 @@ bool ffSettingsGetEnlightenmentProperty(ffEnlightenmentSettings* result) {
550552 Eet_Data_Descriptor * fontDdd = ffeet_data_descriptor_file_new (& fontDdc );
551553 if (!fontDdd ) {
552554 ffeet_close (ef );
555+ ffeet_shutdown ();
553556 return false;
554557 }
555558 FF_EET_DATA_DESCRIPTOR_ADD_BASIC (fontDdd , E_Font_Default , text_class , EET_T_STRING );
@@ -562,6 +565,7 @@ bool ffSettingsGetEnlightenmentProperty(ffEnlightenmentSettings* result) {
562565 if (!edd ) {
563566 ffeet_data_descriptor_free (fontDdd );
564567 ffeet_close (ef );
568+ ffeet_shutdown ();
565569 return false;
566570 }
567571
@@ -591,6 +595,10 @@ bool ffSettingsGetEnlightenmentProperty(ffEnlightenmentSettings* result) {
591595 ffeet_close (ef );
592596 ffeet_data_descriptor_free (edd );
593597 ffeet_data_descriptor_free (fontDdd );
598+ if (!parsed ) {
599+ // We don't shutdown eet so that `result->*` are not freed
600+ ffeet_shutdown ();
601+ }
594602
595603 return !!parsed ;
596604}
0 commit comments