avoid unnecessary strdup() in got_pathset's find_element()
diff --git a/lib/pathset.c b/lib/pathset.c
index 828ea4b..9b12433 100644
--- a/lib/pathset.c
+++ b/lib/pathset.c
@@ -138,9 +138,9 @@ static struct got_pathset_element *
find_element(struct got_pathset *set, const char *path)
{
struct got_pathset_element key, *entry;
- key.path = strdup(path);
+ key.path = (char *)path;
+ key.data = NULL;
entry = RB_FIND(got_pathset_tree, &set->entries, &key);
- free(key.path);
return entry;
}