scf_logw("i: %ld\n", i);
- __dfs_path(f, c, p, ctx, &path);
+ int ret = __dfs_path(f, c, p, ctx, &path);
+ if (ret < 0)
+ return ret;
- printf("\n");
+ printf("ret: %d\n\n", ret);
+
+ if (!path)
+ continue;
+
+ if (ret > 0) {
+ scf_vector_clear(path, NULL);
+ continue;
+ }
+
+ if (scf_vector_add(ctx->paths, path) < 0) {
+ scf_vector_free(path);
+ return -ENOMEM;
+ }
+
+ path = NULL;
}
+
+ if (path) {
+ scf_vector_free(path);
+ path = NULL;
+ }
+
#if 1
for (i = 0; i < ctx->paths->size; i++) {
path = ctx->paths->data[i];