mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-24 20:28:06 +02:00
10 lines
173 B
C
10 lines
173 B
C
|
|
#include <stdio.h>
|
||
|
|
|
||
|
|
void resource_leak_bug() {
|
||
|
|
FILE *f = fopen("data.txt", "r");
|
||
|
|
if (f == NULL) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
// Missing fclose(f) — resource leak
|
||
|
|
}
|