mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Fix memory leak in aurblup.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
400d7845e4
commit
48957ef5d5
1 changed files with 3 additions and 0 deletions
|
@ -182,6 +182,8 @@ read_config(const char *fn)
|
|||
void
|
||||
init(void)
|
||||
{
|
||||
if (mysql_library_init(0, NULL, NULL))
|
||||
mysql_die("could not initialize MySQL library: %s\n");
|
||||
if (!(c = mysql_init(NULL)))
|
||||
mysql_die("failed to setup MySQL client: %s\n");
|
||||
if (!mysql_real_connect(c, mysql_host, mysql_user, mysql_passwd,
|
||||
|
@ -207,6 +209,7 @@ cleanup(void)
|
|||
|
||||
alpm_release();
|
||||
mysql_close(c);
|
||||
mysql_library_end();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
|
Loading…
Add table
Reference in a new issue