diff options
| author | David M. Syzdek <syzdek@bindlebinaries.com> | 2017-07-06 16:05:50 -0800 |
|---|---|---|
| committer | David M. Syzdek <syzdek@bindlebinaries.com> | 2017-07-06 16:05:50 -0800 |
| commit | c4b51f67a18a6f21c8f8cfadbe1f0361319b9c78 (patch) | |
| tree | 9daa6d1dd0c4b3ffba5bfb00ee2260dc4e7d4993 | |
| parent | ec4eff31f580403a6b8efb153821e88df85bdf34 (diff) | |
| download | securecoreutils-c4b51f67a18a6f21c8f8cfadbe1f0361319b9c78.tar.gz securecoreutils-c4b51f67a18a6f21c8f8cfadbe1f0361319b9c78.tar.bz2 securecoreutils-c4b51f67a18a6f21c8f8cfadbe1f0361319b9c78.tar.xz securecoreutils-c4b51f67a18a6f21c8f8cfadbe1f0361319b9c78.zip | |
Removing unnessicarry dynamic memory allocation.
| -rw-r--r-- | src/securecoreutils.c | 6 | ||||
| -rw-r--r-- | src/securecoreutils.h | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/securecoreutils.c b/src/securecoreutils.c index 06656d9..0e45a7e 100644 --- a/src/securecoreutils.c +++ b/src/securecoreutils.c | |||
| @@ -156,11 +156,7 @@ int main(int argc, char * argv[]) | |||
| 156 | 156 | ||
| 157 | memset(&cnf, 0, sizeof(scu_config)); | 157 | memset(&cnf, 0, sizeof(scu_config)); |
| 158 | 158 | ||
| 159 | if ((cnf.prog_name = strdup(PROGRAM_NAME)) == NULL) | 159 | cnf.prog_name = PROGRAM_NAME; |
| 160 | { | ||
| 161 | fprintf(stderr, "%s: out of virtual memory\n", PROGRAM_NAME); | ||
| 162 | return(1); | ||
| 163 | }; | ||
| 164 | 160 | ||
| 165 | // skip argument processing if called via alias | 161 | // skip argument processing if called via alias |
| 166 | if ((cnf.widget = scu_widget_lookup(scu_basename(argv[0]), 1)) != NULL) | 162 | if ((cnf.widget = scu_widget_lookup(scu_basename(argv[0]), 1)) != NULL) |
diff --git a/src/securecoreutils.h b/src/securecoreutils.h index e26f073..b29a16c 100644 --- a/src/securecoreutils.h +++ b/src/securecoreutils.h | |||
| @@ -121,7 +121,7 @@ struct scu_config | |||
| 121 | int verbose; | 121 | int verbose; |
| 122 | int opt_index; | 122 | int opt_index; |
| 123 | int argc; | 123 | int argc; |
| 124 | char * prog_name; | 124 | const char * prog_name; |
| 125 | char ** argv; | 125 | char ** argv; |
| 126 | const scu_widget * widget; | 126 | const scu_widget * widget; |
| 127 | }; | 127 | }; |
