projects
/
scilab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Coverity: fileio module memory errors fixed.
[scilab.git]
/
scilab
/
modules
/
fileio
/
sci_gateway
/
c
/
sci_pwd.c
diff --git
a/scilab/modules/fileio/sci_gateway/c/sci_pwd.c
b/scilab/modules/fileio/sci_gateway/c/sci_pwd.c
index
e14c2cd
..
df9df0f
100644
(file)
--- a/
scilab/modules/fileio/sci_gateway/c/sci_pwd.c
+++ b/
scilab/modules/fileio/sci_gateway/c/sci_pwd.c
@@
-53,15
+53,14
@@
int sci_pwd(char *fname, void* pvApiCtx)
if (sciErr.iErr)
{
printError(&sciErr, 0);
+ FREE(path);
+ path = NULL;
return 0;
}
LhsVar(1) = Rhs + 1;
- if (path)
- {
- FREE(path);
- path = NULL;
- }
+ FREE(path);
+ path = NULL;
PutLhsVar();
}