From 35f950d702f5ddfabf0ba98a6596c13b9757dcb8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Mon, 6 Aug 2012 14:50:51 +0000 Subject: [PATCH] Not freeing getenv() return value. --- org.glite.lb.server/src/bkserverd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/org.glite.lb.server/src/bkserverd.c b/org.glite.lb.server/src/bkserverd.c index 916e39a..0b93f74 100644 --- a/org.glite.lb.server/src/bkserverd.c +++ b/org.glite.lb.server/src/bkserverd.c @@ -587,9 +587,8 @@ int main(int argc, char *argv[]) if (!html_header) { char *html_header_prefix = getenv("GLITE_LB_LOCATION_ETC"); - if (!html_header_prefix) html_header_prefix=strdup("/etc/glite-lb"); + if (!html_header_prefix) html_header_prefix="/etc/glite-lb"; asprintf(&html_header, "%s/html_header.html", html_header_prefix); - free(html_header_prefix); } if (html_header) { char *et, *ed; @@ -795,7 +794,7 @@ int main(int argc, char *argv[]) } if (!dbstring) dbstring = getenv("LBDB"); - if (!dbstring) dbstring = strdup(DEFAULTCS); + if (!dbstring) dbstring = DEFAULTCS; /* Just check the database and let it be. The slaves do the job. */ if (wait_for_open(ctx, dbstring)) { -- 1.8.2.3