aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2013-11-05 17:15:54 +0100
committerLukas Nykryn <lnykryn@redhat.com>2013-11-05 17:15:54 +0100
commitda5ef8a520246768b26dac2603f6d37739870653 (patch)
tree25264c7dd0e05a5ff5dee58e208b0d761fc28e70 /src
parent1030a8dc7f7033ee55dfc0eea0c7c31b790b5284 (diff)
downloadinitscripts-da5ef8a520246768b26dac2603f6d37739870653.tar
initscripts-da5ef8a520246768b26dac2603f6d37739870653.tar.gz
initscripts-da5ef8a520246768b26dac2603f6d37739870653.tar.bz2
initscripts-da5ef8a520246768b26dac2603f6d37739870653.tar.xz
initscripts-da5ef8a520246768b26dac2603f6d37739870653.zip
brandot: fix posssible segfault
Diffstat (limited to 'src')
-rw-r--r--src/brandbot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/brandbot.c b/src/brandbot.c
index c9b21ecd..7418a33f 100644
--- a/src/brandbot.c
+++ b/src/brandbot.c
@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
if (!osrelease)
return 0;
oldname = svGetValue(osrelease, "PRETTY_NAME");
- if (!strcmp(oldname, newname))
+ if (oldname && !strcmp(oldname, newname))
return 0;
svSetValue(osrelease, "PRETTY_NAME", newname);
rc += svWriteFile(osrelease, 0644);