diff --git a/codes/c/chapter_array_and_linkedlist/array.c b/codes/c/chapter_array_and_linkedlist/array.c index dbeaf203c..11f6fa0b1 100644 --- a/codes/c/chapter_array_and_linkedlist/array.c +++ b/codes/c/chapter_array_and_linkedlist/array.c @@ -108,5 +108,7 @@ int main() { int index = find(res, size, 3); printf("在 res 中查找元素 3 ,得到索引 = %d\n", index); + /* 释放内存 */ + free(res); return 0; }