diff options
author | aunsane <aunsane@gmail.com> | 2018-02-24 15:19:44 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-02-24 15:19:44 +0300 |
commit | 1cd49f75aa0dd71a1df44a1740dd4c15fe5656cf (patch) | |
tree | d7e1520cb74d662afe839f54eb7b54d2c01c7d3e /plugins/ExternalAPI | |
parent | b2eb0ef7a0f7f2b2bae0a48966038a673701df21 (diff) |
SendSS: Reworking settings (#1144)
CloudFile: fix upload service
Db_autobackups: fix build
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r-- | plugins/ExternalAPI/m_cloudfile.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/ExternalAPI/m_cloudfile.h b/plugins/ExternalAPI/m_cloudfile.h index 9207546c23..505f9e3462 100644 --- a/plugins/ExternalAPI/m_cloudfile.h +++ b/plugins/ExternalAPI/m_cloudfile.h @@ -31,10 +31,20 @@ struct CFUPLOADDATA struct CFUPLOADRESULT { - char **links; - wchar_t *description; + char **links; // need to be freed manually or by calling cfur_free + size_t linkCount; + wchar_t *description; // need to be freed manually or by calling cfur_free }; +// frees allocated fields of CFUPLOADRESULT +__inline void cfur_free(CFUPLOADRESULT *ur) +{ + for (size_t i = 0; i < ur->linkCount; i++) + mir_free(ur->links[0]); + mir_free(ur->links); + mir_free(ur->description); +} + // upload file on cloud service // wParam = (WPARAM)(const CFUPLOADDATA*)uploadData // lParam = (LPARAM)(char CFUPLOADRESULT*)uploadResult (can be NULL) |