mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
couple of memory leaks fixes.
This commit is contained in:
parent
1be3894e6f
commit
48b3bb980d
5 changed files with 23 additions and 3 deletions
|
@ -95,6 +95,7 @@ void AreaStore::deserialize(std::istream &is)
|
|||
is.read(data, data_len);
|
||||
a.data = std::string(data, data_len);
|
||||
insertArea(&a);
|
||||
delete [] data;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -542,7 +542,7 @@ static SRP_Result fill_buff()
|
|||
|
||||
if (!fp) return SRP_ERR;
|
||||
|
||||
if (fread(g_rand_buff, sizeof(g_rand_buff), 1, fp) != 1) return SRP_ERR;
|
||||
if (fread(g_rand_buff, sizeof(g_rand_buff), 1, fp) != 1) { fclose(fp); return SRP_ERR; }
|
||||
if (fclose(fp)) return SRP_ERR;
|
||||
#endif
|
||||
return SRP_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue