#ifndef __PROCESS_POOL_LAUNCHPAD_UTIL_H_
#define __PROCESS_POOL_LAUNCHPAD_UTIL_H_
+#include <stdlib.h>
#include <launchpad_util.h>
#include <smack_labeling_support.h>
return 0;
}
+
+static bundle *_s_bundle = NULL;
+static void __at_exit_to_release_bundle()
+{
+ if (_s_bundle) {
+ bundle_free(_s_bundle);
+ _s_bundle = NULL;
+ }
+}
+
_static_ void process_pool_launchpad_main_loop(app_pkt_t* pkt, char* out_app_path, int* out_argc, char ***out_argv)
{
exit(-1);
}
+ if (_s_bundle != NULL) {
+ bundle_free(_s_bundle);
+ }
+ _s_bundle = kb;
+ atexit(__at_exit_to_release_bundle);
+
pkg_name = bundle_get_val(kb, AUL_K_PKG_NAME);
SECURE_LOGD("pkg name : %s", pkg_name);
exit(-1);
}
-
-#if 0 // intentional
if (menu_info != NULL) {
_free_app_info_from_db(menu_info);
}
-
- if (kb != NULL) {
- bundle_free(kb);
- }
-#endif
}
-#endif // __PROCESS_POOL_LAUNCHPAD_UTIL_H_
\ No newline at end of file
+#endif // __PROCESS_POOL_LAUNCHPAD_UTIL_H_