chibisafe_netstorage_middleman : defer reset

This commit is contained in:
minoplhy 2024-04-10 01:10:38 +07:00
parent fab89c56e5
commit 54cfa1ace0
Signed by: minoplhy
GPG Key ID: 41D406044E2434BF

View File

@ -107,6 +107,9 @@ func NetworkStoragePut(URL string, ContentType string, filepath string) ([]byte,
// Set appropriate headers for the file // Set appropriate headers for the file
req.Header.Set("Content-Type", ContentType) req.Header.Set("Content-Type", ContentType)
// clear memory for others process to use
defer buffer.Reset()
// Send the request // Send the request
resp, err := client.Do(req) resp, err := client.Do(req)
if err != nil { if err != nil {