diff options
author | Craig Small <csmall@dropbear.xyz> | 2021-11-02 17:14:29 +1100 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2021-11-02 17:14:29 +1100 |
commit | f3e52900128c0d536a747433fd4120b5f1de1e7d (patch) | |
tree | b17015b79d28a913a2b2b1dc8f054e826b5a0618 | |
parent | ad51fef1aaaaf6e059dfd62e8778318ed59000de (diff) | |
download | procps-ng-f3e52900128c0d536a747433fd4120b5f1de1e7d.tar.gz |
pmap: minor Coverity fix for -N option
99126 Explicit null dereferenced
Not 100% sure this is valid (the same branch that sets the variable
is the one that sets N_option) but not too hard to fix.
Signed-off-by: Craig Small <csmall@dropbear.xyz>
-rw-r--r-- | pmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -909,10 +909,13 @@ static int config_read (char *rc_filename) } -static int config_create (char *rc_filename) +static int config_create (const char *rc_filename) { FILE *f; + if (rc_filename == NULL) + return 0; + /* check if rc exists */ f = fopen(rc_filename, "r"); |