{"action":"created","comment":{"url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/comments/88589871","pull_request_review_id":9159786,"id":88589871,"diff_hunk":"@@ -524,6 +525,178 @@ int perf_config(config_fn_t fn, void *data)\n \treturn ret;\n }\n \n+static struct perf_config_section *find_section(struct list_head *sections,\n+\t\t\t\t\t\tconst char *section_name)\n+{\n+\tstruct perf_config_section *section;\n+\n+\tlist_for_each_entry(section, sections, node)\n+\t\tif (!strcmp(section->name, section_name))\n+\t\t\treturn section;\n+\n+\treturn NULL;\n+}\n+\n+static struct perf_config_item *find_config_item(const char *name,\n+\t\t\t\t\t\t struct perf_config_section *section)\n+{\n+\tstruct perf_config_item *item;\n+\n+\tlist_for_each_entry(item, &section->items, node)\n+\t\tif (!strcmp(item->name, name))\n+\t\t\treturn item;\n+\n+\treturn NULL;\n+}\n+\n+static struct perf_config_section *add_section(struct list_head *sections,\n+\t\t\t\t\t       const char *section_name)\n+{\n+\tstruct perf_config_section *section = zalloc(sizeof(*section));\n+\n+\tif (!section)\n+\t\treturn NULL;\n+\n+\tINIT_LIST_HEAD(&section->items);\n+\tsection->name = strdup(section_name);\n+\tif (!section->name) {\n+\t\tpr_debug(\"%s: strdup failed\\n\", __func__);\n+\t\tfree(section);\n+\t\treturn NULL;\n+\t}\n+\n+\tlist_add_tail(&section->node, sections);\n+\treturn section;\n+}\n+\n+static struct perf_config_item *add_config_item(struct perf_config_section *section,\n+\t\t\t\t\t\tconst char *name)\n+{\n+\tstruct perf_config_item *item = zalloc(sizeof(*item));\n+\n+\tif (!item)\n+\t\treturn NULL;\n+\n+\titem->name = strdup(name);\n+\tif (!item->name) {\n+\t\tpr_debug(\"%s: strdup failed\\n\", __func__);\n+\t\tfree(item);\n+\t\treturn NULL;\n+\t}\n+\n+\tlist_add_tail(&item->node, &section->items);\n+\treturn item;\n+}\n+\n+static int set_value(struct perf_config_item *item, const char *value)\n+{\n+\tchar *val = strdup(value);\n+\n+\tif (!val)\n+\t\treturn -1;\n+\n+\tfree(item->value);","path":"tools/perf/util/config.c","position":82,"original_position":82,"commit_id":"ae7cbd8e62e7b77d8345b9a584fc8e3a46c465b1","original_commit_id":"0266a05121741cb9d4619e321fe6341ec1a82b28","user":{"login":"cdsleaf","id":11720596,"avatar_url":"https://avatars.githubusercontent.com/u/11720596?v=3","gravatar_id":"","url":"https://api.github.com/users/cdsleaf","html_url":"https://github.com/cdsleaf","followers_url":"https://api.github.com/users/cdsleaf/followers","following_url":"https://api.github.com/users/cdsleaf/following{/other_user}","gists_url":"https://api.github.com/users/cdsleaf/gists{/gist_id}","starred_url":"https://api.github.com/users/cdsleaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdsleaf/subscriptions","organizations_url":"https://api.github.com/users/cdsleaf/orgs","repos_url":"https://api.github.com/users/cdsleaf/repos","events_url":"https://api.github.com/users/cdsleaf/events{/privacy}","received_events_url":"https://api.github.com/users/cdsleaf/received_events","type":"User","site_admin":false},"body":"item->value 는 free 이후에 null값이 들어가야함으로 zfree()를 사용해야할 것 같습니다.","created_at":"2016-11-18T02:25:43Z","updated_at":"2016-11-18T02:25:44Z","html_url":"https://github.com/soscon2016-advancedGit-Team-Ps/linux-perf/pull/2#discussion_r88589871","pull_request_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/comments/88589871"},"html":{"href":"https://github.com/soscon2016-advancedGit-Team-Ps/linux-perf/pull/2#discussion_r88589871"},"pull_request":{"href":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/2","id":94291603,"html_url":"https://github.com/soscon2016-advancedGit-Team-Ps/linux-perf/pull/2","diff_url":"https://github.com/soscon2016-advancedGit-Team-Ps/linux-perf/pull/2.diff","patch_url":"https://github.com/soscon2016-advancedGit-Team-Ps/linux-perf/pull/2.patch","issue_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/issues/2","number":2,"state":"open","locked":false,"title":"Develop","user":{"login":"StriTzKim","id":7405571,"avatar_url":"https://avatars.githubusercontent.com/u/7405571?v=3","gravatar_id":"","url":"https://api.github.com/users/StriTzKim","html_url":"https://github.com/StriTzKim","followers_url":"https://api.github.com/users/StriTzKim/followers","following_url":"https://api.github.com/users/StriTzKim/following{/other_user}","gists_url":"https://api.github.com/users/StriTzKim/gists{/gist_id}","starred_url":"https://api.github.com/users/StriTzKim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StriTzKim/subscriptions","organizations_url":"https://api.github.com/users/StriTzKim/orgs","repos_url":"https://api.github.com/users/StriTzKim/repos","events_url":"https://api.github.com/users/StriTzKim/events{/privacy}","received_events_url":"https://api.github.com/users/StriTzKim/received_events","type":"User","site_admin":false},"body":"This infrastructure code was designed for upcoming features of perf-config.","created_at":"2016-11-18T02:22:49Z","updated_at":"2016-11-18T02:25:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd6c61439d05461e63467db47b83e8909d9eb4a2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/2/commits","review_comments_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/2/comments","review_comment_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/issues/2/comments","statuses_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/statuses/ae7cbd8e62e7b77d8345b9a584fc8e3a46c465b1","head":{"label":"StriTzKim:develop","ref":"develop","sha":"ae7cbd8e62e7b77d8345b9a584fc8e3a46c465b1","user":{"login":"StriTzKim","id":7405571,"avatar_url":"https://avatars.githubusercontent.com/u/7405571?v=3","gravatar_id":"","url":"https://api.github.com/users/StriTzKim","html_url":"https://github.com/StriTzKim","followers_url":"https://api.github.com/users/StriTzKim/followers","following_url":"https://api.github.com/users/StriTzKim/following{/other_user}","gists_url":"https://api.github.com/users/StriTzKim/gists{/gist_id}","starred_url":"https://api.github.com/users/StriTzKim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StriTzKim/subscriptions","organizations_url":"https://api.github.com/users/StriTzKim/orgs","repos_url":"https://api.github.com/users/StriTzKim/repos","events_url":"https://api.github.com/users/StriTzKim/events{/privacy}","received_events_url":"https://api.github.com/users/StriTzKim/received_events","type":"User","site_admin":false},"repo":{"id":74084377,"name":"linux-perf","full_name":"StriTzKim/linux-perf","owner":{"login":"StriTzKim","id":7405571,"avatar_url":"https://avatars.githubusercontent.com/u/7405571?v=3","gravatar_id":"","url":"https://api.github.com/users/StriTzKim","html_url":"https://github.com/StriTzKim","followers_url":"https://api.github.com/users/StriTzKim/followers","following_url":"https://api.github.com/users/StriTzKim/following{/other_user}","gists_url":"https://api.github.com/users/StriTzKim/gists{/gist_id}","starred_url":"https://api.github.com/users/StriTzKim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StriTzKim/subscriptions","organizations_url":"https://api.github.com/users/StriTzKim/orgs","repos_url":"https://api.github.com/users/StriTzKim/repos","events_url":"https://api.github.com/users/StriTzKim/events{/privacy}","received_events_url":"https://api.github.com/users/StriTzKim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/StriTzKim/linux-perf","description":null,"fork":true,"url":"https://api.github.com/repos/StriTzKim/linux-perf","forks_url":"https://api.github.com/repos/StriTzKim/linux-perf/forks","keys_url":"https://api.github.com/repos/StriTzKim/linux-perf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StriTzKim/linux-perf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StriTzKim/linux-perf/teams","hooks_url":"https://api.github.com/repos/StriTzKim/linux-perf/hooks","issue_events_url":"https://api.github.com/repos/StriTzKim/linux-perf/issues/events{/number}","events_url":"https://api.github.com/repos/StriTzKim/linux-perf/events","assignees_url":"https://api.github.com/repos/StriTzKim/linux-perf/assignees{/user}","branches_url":"https://api.github.com/repos/StriTzKim/linux-perf/branches{/branch}","tags_url":"https://api.github.com/repos/StriTzKim/linux-perf/tags","blobs_url":"https://api.github.com/repos/StriTzKim/linux-perf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StriTzKim/linux-perf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StriTzKim/linux-perf/git/refs{/sha}","trees_url":"https://api.github.com/repos/StriTzKim/linux-perf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StriTzKim/linux-perf/statuses/{sha}","languages_url":"https://api.github.com/repos/StriTzKim/linux-perf/languages","stargazers_url":"https://api.github.com/repos/StriTzKim/linux-perf/stargazers","contributors_url":"https://api.github.com/repos/StriTzKim/linux-perf/contributors","subscribers_url":"https://api.github.com/repos/StriTzKim/linux-perf/subscribers","subscription_url":"https://api.github.com/repos/StriTzKim/linux-perf/subscription","commits_url":"https://api.github.com/repos/StriTzKim/linux-perf/commits{/sha}","git_commits_url":"https://api.github.com/repos/StriTzKim/linux-perf/git/commits{/sha}","comments_url":"https://api.github.com/repos/StriTzKim/linux-perf/comments{/number}","issue_comment_url":"https://api.github.com/repos/StriTzKim/linux-perf/issues/comments{/number}","contents_url":"https://api.github.com/repos/StriTzKim/linux-perf/contents/{+path}","compare_url":"https://api.github.com/repos/StriTzKim/linux-perf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StriTzKim/linux-perf/merges","archive_url":"https://api.github.com/repos/StriTzKim/linux-perf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StriTzKim/linux-perf/downloads","issues_url":"https://api.github.com/repos/StriTzKim/linux-perf/issues{/number}","pulls_url":"https://api.github.com/repos/StriTzKim/linux-perf/pulls{/number}","milestones_url":"https://api.github.com/repos/StriTzKim/linux-perf/milestones{/number}","notifications_url":"https://api.github.com/repos/StriTzKim/linux-perf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StriTzKim/linux-perf/labels{/name}","releases_url":"https://api.github.com/repos/StriTzKim/linux-perf/releases{/id}","deployments_url":"https://api.github.com/repos/StriTzKim/linux-perf/deployments","created_at":"2016-11-18T01:45:38Z","updated_at":"2016-11-18T01:45:41Z","pushed_at":"2016-11-18T02:20:11Z","git_url":"git://github.com/StriTzKim/linux-perf.git","ssh_url":"git@github.com:StriTzKim/linux-perf.git","clone_url":"https://github.com/StriTzKim/linux-perf.git","svn_url":"https://github.com/StriTzKim/linux-perf","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"soscon2016-advancedGit-Team-Ps:master","ref":"master","sha":"51a1dedb0ae5d3b2d76ea60baccbb68630200b8d","user":{"login":"soscon2016-advancedGit-Team-Ps","id":23536407,"avatar_url":"https://avatars.githubusercontent.com/u/23536407?v=3","gravatar_id":"","url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps","html_url":"https://github.com/soscon2016-advancedGit-Team-Ps","followers_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/followers","following_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/following{/other_user}","gists_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/gists{/gist_id}","starred_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/subscriptions","organizations_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/orgs","repos_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/repos","events_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/events{/privacy}","received_events_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/received_events","type":"Organization","site_admin":false},"repo":{"id":74083691,"name":"linux-perf","full_name":"soscon2016-advancedGit-Team-Ps/linux-perf","owner":{"login":"soscon2016-advancedGit-Team-Ps","id":23536407,"avatar_url":"https://avatars.githubusercontent.com/u/23536407?v=3","gravatar_id":"","url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps","html_url":"https://github.com/soscon2016-advancedGit-Team-Ps","followers_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/followers","following_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/following{/other_user}","gists_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/gists{/gist_id}","starred_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/subscriptions","organizations_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/orgs","repos_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/repos","events_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/events{/privacy}","received_events_url":"https://api.github.com/users/soscon2016-advancedGit-Team-Ps/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/soscon2016-advancedGit-Team-Ps/linux-perf","description":null,"fork":false,"url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf","forks_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/forks","keys_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/teams","hooks_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/hooks","issue_events_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/issues/events{/number}","events_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/events","assignees_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/assignees{/user}","branches_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/branches{/branch}","tags_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/tags","blobs_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/git/refs{/sha}","trees_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/statuses/{sha}","languages_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/languages","stargazers_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/stargazers","contributors_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/contributors","subscribers_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/subscribers","subscription_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/subscription","commits_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/commits{/sha}","git_commits_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/git/commits{/sha}","comments_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/comments{/number}","issue_comment_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/issues/comments{/number}","contents_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/contents/{+path}","compare_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/merges","archive_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/downloads","issues_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/issues{/number}","pulls_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls{/number}","milestones_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/milestones{/number}","notifications_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/labels{/name}","releases_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/releases{/id}","deployments_url":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/deployments","created_at":"2016-11-18T01:36:23Z","updated_at":"2016-11-18T01:41:56Z","pushed_at":"2016-11-18T02:22:49Z","git_url":"git://github.com/soscon2016-advancedGit-Team-Ps/linux-perf.git","ssh_url":"git@github.com:soscon2016-advancedGit-Team-Ps/linux-perf.git","clone_url":"https://github.com/soscon2016-advancedGit-Team-Ps/linux-perf.git","svn_url":"https://github.com/soscon2016-advancedGit-Team-Ps/linux-perf","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/2"},"html":{"href":"https://github.com/soscon2016-advancedGit-Team-Ps/linux-perf/pull/2"},"issue":{"href":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/issues/2"},"comments":{"href":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/soscon2016-advancedGit-Team-Ps/linux-perf/statuses/ae7cbd8e62e7b77d8345b9a584fc8e3a46c465b1"}}}}
{"actor":{"display_login":"cdsleaf"}}