Spaces:
Sleeping
Sleeping
File size: 603 Bytes
a21d9ae | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | {
"task_id": "memory_leak_medium_1",
"task_name": "File Handle Leak",
"description": "Find the memory leak where file handles are not properly closed",
"difficulty": "medium",
"code_diff": "def read_files(file_list):\n contents = []\n for filename in file_list:\n f = open(filename, 'r')\n data = f.read()\n contents.append(data)\n return contents",
"expected_issues": [
{
"line": 4,
"type": "resource_leak",
"severity": "high",
"description": "File not closed after reading"
}
]
} |