Fixed soem errors from a cppcheck run
mbrampton@martin-office:~/Dropbox/development/skygit/MaxScale/server$ cppcheck -q core/*.c [core/adminusers.c:302]: (error) Resource leak: fp_tmp [core/filter.c:382]: (error) Uninitialized variable: me [core/service.c:1071]: (error) Uninitialized variable: succp
This commit is contained in:
parent
40c2846887
commit
3476558f52
@ -298,6 +298,7 @@ char* admin_remove_user(
|
||||
fname,
|
||||
err)));
|
||||
fclose(fp);
|
||||
fclose(fp_tmp);
|
||||
unlink(fname_tmp);
|
||||
return ADMIN_ERR_PWDFILEACCESS;
|
||||
}
|
||||
@ -325,6 +326,7 @@ char* admin_remove_user(
|
||||
fname,
|
||||
err)));
|
||||
fclose(fp);
|
||||
fclose(fp_tmp);
|
||||
unlink(fname_tmp);
|
||||
return ADMIN_ERR_PWDFILEACCESS;
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ DOWNSTREAM *me;
|
||||
UPSTREAM *
|
||||
filterUpstream(FILTER_DEF *filter, void *fsession, UPSTREAM *upstream)
|
||||
{
|
||||
UPSTREAM *me;
|
||||
UPSTREAM *me = NULL;
|
||||
|
||||
/*
|
||||
* The the filter has no setUpstream entry point then is does
|
||||
|
@ -1008,7 +1008,7 @@ bool service_set_param_value (
|
||||
{
|
||||
char* p;
|
||||
int valint;
|
||||
bool succp;
|
||||
bool succp = true;
|
||||
|
||||
/**
|
||||
* Find out whether the value is numeric and ends with '%' or '\0'
|
||||
|
Loading…
x
Reference in New Issue
Block a user