diff options
author | Bill Nottingham <notting@redhat.com> | 2005-07-21 19:44:02 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-07-21 19:44:02 +0000 |
commit | 0b33367d131f7c23f49d5c9ec7fe469211499788 (patch) | |
tree | e0d19d8bc1758b9d8f0ee1a4af640012bba89bd8 /src | |
parent | 86389b7864ed6ef76a0e3dc24f86532704e37b02 (diff) | |
download | initscripts-0b33367d131f7c23f49d5c9ec7fe469211499788.tar initscripts-0b33367d131f7c23f49d5c9ec7fe469211499788.tar.gz initscripts-0b33367d131f7c23f49d5c9ec7fe469211499788.tar.bz2 initscripts-0b33367d131f7c23f49d5c9ec7fe469211499788.tar.xz initscripts-0b33367d131f7c23f49d5c9ec7fe469211499788.zip |
backport invalid free fix
Diffstat (limited to 'src')
-rw-r--r-- | src/initlog.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/initlog.c b/src/initlog.c index e9b8e265..af75c7b1 100644 --- a/src/initlog.c +++ b/src/initlog.c @@ -272,11 +272,12 @@ int logEvent(char *cmd, int eventtype,char *string) { struct logInfo logentry; if (cmd) { - logentry.cmd = strdup(basename(cmd)); + logentry.cmd = basename(cmd); if ((logentry.cmd[0] =='K' || logentry.cmd[0] == 'S') && ( logentry.cmd[1] >= '0' && logentry.cmd[1] <= '9' ) && ( logentry.cmd[2] >= '0' && logentry.cmd[2] <= '9' ) ) logentry.cmd+=3; + logentry.cmd = strdup(logentry.cmd); } else logentry.cmd = strdup(_("(none)")); if (!string) { @@ -305,11 +306,12 @@ int logString(char *cmd, char *string) { int rc; if (cmd) { - logentry.cmd = strdup(basename(cmd)); + logentry.cmd = basename(cmd); if ((logentry.cmd[0] =='K' || logentry.cmd[0] == 'S') && ( logentry.cmd[1] >= '0' && logentry.cmd[1] <= 0x39 ) && ( logentry.cmd[2] >= '0' && logentry.cmd[2] <= 0x39 ) ) logentry.cmd+=3; + logentry.cmd = strdup(logentry.cmd); } else logentry.cmd = strdup(_("")); logentry.line = strdup(string); |