mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
use strdup to alloc memory refeed with free!
This commit is contained in:
parent
6e9e37be3a
commit
42cce22f2d
1 changed files with 2 additions and 2 deletions
|
@ -364,7 +364,7 @@ static void php_fbsql_init_globals(zend_fbsql_globals *fbsql_globals)
|
|||
char name[256];
|
||||
gethostname(name, sizeof(name));
|
||||
name[sizeof(name)-1] = 0;
|
||||
fbsql_globals->hostName = estrdup(name);
|
||||
fbsql_globals->hostName = strdup(name);
|
||||
}
|
||||
|
||||
fbsql_globals->persistantCount = 0;
|
||||
|
@ -1531,7 +1531,7 @@ int mdOk(PHPFBLink* link, FBCMetaData* md, char* sql)
|
|||
else
|
||||
php_error(E_WARNING, "No message");
|
||||
}
|
||||
link->errorText = estrdup(emg);
|
||||
link->errorText = strdup(emg);
|
||||
link->errorNo = 1;
|
||||
free(emg);
|
||||
fbcemdRelease(emd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue