if (!type) {
return;
}
+
if (type->opt) {
free(type->opt->symbol);
+
+ if (type->opt->ctx_type == CONTEXT_APP_CONTEXT) {
+ free(type->opt->u.app_ctx.ctx_name);
+ free(type->opt->u.app_ctx.provider_name);
+ }
}
+
delete type->opt;
free(type);
}
}
/* String starts with $app. */
- if (strncmp(ctx, app_ctx_prefix, sizeof(app_ctx_prefix) - 1)) {
+ if (strncmp(ctx, app_ctx_prefix, sizeof(app_ctx_prefix) - 1) != 0) {
goto not_found;
}