summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--proxy/src/gp_config.c14
-rw-r--r--proxy/src/mechglue/gpp_import_and_canon_name.c2
-rwxr-xr-xproxy/tests/scripts/dlopen.sh4
3 files changed, 10 insertions, 10 deletions
diff --git a/proxy/src/gp_config.c b/proxy/src/gp_config.c
index 1b676d3..5051a91 100644
--- a/proxy/src/gp_config.c
+++ b/proxy/src/gp_config.c
@@ -33,12 +33,14 @@
static void free_str_array(const char ***a, int *count)
{
- const char **array = *a;
+ const char **array;
int i;
if (!a) {
return;
}
+ array = *a;
+
if (count) {
for (i = 0; i < *count; i++) {
safefree(array[i]);
@@ -282,13 +284,13 @@ static int gp_init_ini_context(const char *config_file,
}
ret = gp_config_init(config_file, ctx);
+
if (ret) {
- return ret;
+ free(ctx);
+ } else {
+ *ctxp = ctx;
}
-
- *ctxp = ctx;
-
- return 0;
+ return ret;
}
int load_config(struct gp_config *cfg)
diff --git a/proxy/src/mechglue/gpp_import_and_canon_name.c b/proxy/src/mechglue/gpp_import_and_canon_name.c
index 0529623..727823c 100644
--- a/proxy/src/mechglue/gpp_import_and_canon_name.c
+++ b/proxy/src/mechglue/gpp_import_and_canon_name.c
@@ -266,7 +266,7 @@ OM_uint32 gssi_release_name(OM_uint32 *minor_status,
{
struct gpp_name_handle *name;
uint32_t rmaj, rmin = 0;
- OM_uint32 maj, min = 0;
+ OM_uint32 maj = 0, min = 0;
GSSI_TRACE();
diff --git a/proxy/tests/scripts/dlopen.sh b/proxy/tests/scripts/dlopen.sh
index 890cc39..1896a83 100755
--- a/proxy/tests/scripts/dlopen.sh
+++ b/proxy/tests/scripts/dlopen.sh
@@ -7,12 +7,10 @@ cat >> $tempdir/dlopen.c << _EOF
#include <dlfcn.h>
#include <stdio.h>
#include <limits.h>
-#include <sys/stat.h>
/* Simple program to see if dlopen() would succeed. */
int main(int argc, char **argv)
{
int i;
- struct stat st;
char buf[PATH_MAX];
for (i = 1; i < argc; i++) {
if (dlopen(argv[i], RTLD_NOW)) {
@@ -20,7 +18,7 @@ int main(int argc, char **argv)
argv[i]);
} else {
snprintf(buf, sizeof(buf), "./%s", argv[i]);
- if ((stat(buf, &st) == 0) && dlopen(buf, RTLD_NOW)) {
+ if (dlopen(buf, RTLD_NOW)) {
fprintf(stdout, "dlopen() of \"./%s\" "
"succeeded.\n", argv[i]);
} else {