Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Guillaume Baulieu
agapro
Commits
6af511da
Commit
6af511da
authored
Jul 25, 2018
by
Guillaume Baulieu
Browse files
Freeing leaking memory and closing opened file
parent
8eee1579
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
0 deletions
+7
-0
common/adetParams.cpp
common/adetParams.cpp
+1
-0
filters/Ancillary/AncillaryFilterVME.cpp
filters/Ancillary/AncillaryFilterVME.cpp
+2
-0
filters/Tracking/includeMGT/mgt.c
filters/Tracking/includeMGT/mgt.c
+2
-0
producers/AncillaryTCP/tcp_client_file.c
producers/AncillaryTCP/tcp_client_file.c
+2
-0
No files found.
common/adetParams.cpp
View file @
6af511da
...
...
@@ -350,6 +350,7 @@ bool adetParams::ReadXtalkCoeffs(std::string cname, bool verbose)
while
(
fscanf
(
tfp
,
"%d %d %f"
,
&
segseen
,
&
seggate
,
&
xx
)
==
3
)
{
if
(
seggate
<
0
||
seggate
>=
kNSG
||
segseen
<
0
||
segseen
>=
kNSG
)
{
printf
(
"
\n
Wrong channel number: %d %d %f
\n
"
,
seggate
,
segseen
,
xx
);
fclose
(
tfp
);
return
false
;
}
xTalkProp
[
segseen
][
seggate
]
=
xx
;
...
...
filters/Ancillary/AncillaryFilterVME.cpp
View file @
6af511da
...
...
@@ -107,11 +107,13 @@ Int_t AncillaryFilterVME::AlgoInitialise()
for
(
int
ii
=
0
;
ii
<
3
*
32
;
ii
++
)
{
if
(
fscanf
(
conf_file
,
"%d %d %d"
,
&
Conv
,
&
Ch
,
&
Cont
)
!=
3
)
{
cout
<<
"Error reading line "
<<
ii
<<
" of "
<<
fPRISMALUTFile
<<
endl
;
fclose
(
conf_file
);
return
132
;
}
LUT
[
Conv
][
Ch
]
=
Cont
;
cout
<<
"LUT[ "
<<
Conv
<<
" ][ "
<<
setw
(
2
)
<<
Ch
<<
" ] = "
<<
setw
(
3
)
<<
LUT
[
Conv
][
Ch
]
<<
endl
;
}
fclose
(
conf_file
);
#endif // ANF_PRISMA
return
0
;
...
...
filters/Tracking/includeMGT/mgt.c
View file @
6af511da
...
...
@@ -2299,6 +2299,8 @@ void openFileMGTDIR(const char * name, FILE **fp)
printf
(
"
\n
Error opening %s
\n
"
,
filename
);
errexit
(
"openFileMGTDIR"
);
}
free
(
filename
);
free
(
workdir
);
}
#if STATINSIDEDET == 1
...
...
producers/AncillaryTCP/tcp_client_file.c
View file @
6af511da
...
...
@@ -197,6 +197,7 @@ int main ( int argc, char *argv[] ) {
}
else
{
// error opening file
printf
(
"Could not read file... reached EOF?
\n
"
);
fclose
(
fp
);
return
0
;
}
...
...
@@ -242,5 +243,6 @@ int main ( int argc, char *argv[] ) {
}
*/
}
//while (keep_connection_alive)
fclose
(
fp
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment