diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2013-01-09 17:10:57 +0100 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2013-01-09 17:15:19 +0100 |
commit | 0908dd2fd5536cf15d75780980ac2eca37ff800f (patch) | |
tree | 8651c958e7bd5941aea2297de561c560e576c6be /src | |
parent | 3c123e0899b56c0587db36420da5e049c56d9e19 (diff) |
bootchart: check return of fopen before setvbuf in log.c
Diffstat (limited to 'src')
-rw-r--r-- | src/bootchart/log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootchart/log.c b/src/bootchart/log.c index 89c7b3523c..6c40913973 100644 --- a/src/bootchart/log.c +++ b/src/bootchart/log.c @@ -364,9 +364,9 @@ schedstat_next: if (!ps->smaps) { sprintf(filename, "/proc/%d/smaps", pid); ps->smaps = fopen(filename, "r"); - setvbuf(ps->smaps, smaps_buf, _IOFBF, sizeof(smaps_buf)); if (!ps->smaps) continue; + setvbuf(ps->smaps, smaps_buf, _IOFBF, sizeof(smaps_buf)); } else { rewind(ps->smaps); } |