struct rspamd_http_message *msg)
{
const guchar *p;
- gchar *src = NULL;
+ gchar *src = NULL, *psrc;
gsize remain;
guint32 revision, our_rev, len, cnt = 0;
struct fuzzy_peer_cmd cmd, *pcmd;
/* Detect source from url: /update_v1/<source>, so we look for the last '/' */
remain = msg->url->len;
- src = rspamd_fstringdup (msg->url);
+ psrc = rspamd_fstringdup (msg->url);
+ src = psrc;
while (remain--) {
if (src[remain] == '/') {
if (revision <= our_rev) {
msg_err ("remote revision:d %d is older than ours: %d, refusing update",
revision, our_rev);
- g_free (src);
+ g_free (psrc);
return;
}
" revision: %ud", cnt, revision);
err:
- g_free (src);
+ g_free (psrc);
if (updates) {
/* We still need to clear queue */