Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vraious TreeBrowser fixes #46

Merged
merged 4 commits into from
Jun 21, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
treebrowser: Fix a potential invalid free
b4n committed Jun 20, 2012

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
commit 3388d87c421d25bca4fd3c202813291dfdb6ef98
4 changes: 2 additions & 2 deletions treebrowser/src/treebrowser.c
Original file line number Diff line number Diff line change
@@ -791,7 +791,7 @@ treebrowser_expand_to_path(gchar* root, gchar* find)
{
int i = 0;
gboolean founded = FALSE, global_founded = FALSE;
gchar *new = "";
gchar *new = NULL;
gchar **root_segments = NULL, **find_segments = NULL;
guint root_segments_n = 0, find_segments_n = 0;

@@ -804,7 +804,7 @@ treebrowser_expand_to_path(gchar* root, gchar* find)

for (i = 1; i<=find_segments_n; i++)
{
new = g_strconcat(new, G_DIR_SEPARATOR_S, find_segments[i], NULL);
new = g_strconcat(new ? new : "", G_DIR_SEPARATOR_S, find_segments[i], NULL);

if (founded)
{