Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
medialibrary
Commits
0bde9d01
Commit
0bde9d01
authored
May 18, 2014
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SqliteTools: Fix memory leak
parent
eb467da0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
src/SqliteTools.cpp
src/SqliteTools.cpp
+3
-10
No files found.
src/SqliteTools.cpp
View file @
0bde9d01
...
...
@@ -4,17 +4,10 @@
bool
SqliteTools
::
createTable
(
sqlite3
*
db
,
const
char
*
request
)
{
sqlite3_stmt
*
stmt
;
int
res
=
sqlite3_prepare_v2
(
db
,
request
,
-
1
,
&
stmt
,
NULL
);
if
(
res
!=
SQLITE_OK
)
{
std
::
cerr
<<
"Failed to execute request: "
<<
request
<<
std
::
endl
;
std
::
cerr
<<
sqlite3_errmsg
(
db
)
<<
std
::
endl
;
return
false
;
}
res
=
sqlite3_step
(
stmt
);
auto
stmt
=
executeRequest
(
db
,
request
);
int
res
=
sqlite3_step
(
stmt
.
get
()
);
while
(
res
!=
SQLITE_DONE
&&
res
!=
SQLITE_ERROR
)
res
=
sqlite3_step
(
stmt
);
res
=
sqlite3_step
(
stmt
.
get
()
);
if
(
res
==
SQLITE_ERROR
)
{
std
::
cerr
<<
"Failed to execute request: "
<<
request
<<
std
::
endl
;
...
...
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