summaryrefslogtreecommitdiff
path: root/plugins/ExternalAPI
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-02-24 15:19:44 +0300
committeraunsane <aunsane@gmail.com>2018-02-24 15:19:44 +0300
commit1cd49f75aa0dd71a1df44a1740dd4c15fe5656cf (patch)
treed7e1520cb74d662afe839f54eb7b54d2c01c7d3e /plugins/ExternalAPI
parentb2eb0ef7a0f7f2b2bae0a48966038a673701df21 (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.h14
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)