mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-02 15:48:06 +00:00
fixed wrong free
This commit is contained in:
parent
bc821f8c69
commit
3ff52aee8a
@ -314,16 +314,13 @@ get_commit_id (SeafDBRow *row, void *data)
|
||||
}
|
||||
|
||||
static void
|
||||
publish_repo_update_event (char *repo_id, char *commit_id)
|
||||
publish_repo_update_event (const char *repo_id, const char *commit_id)
|
||||
{
|
||||
char buf[128];
|
||||
snprintf (buf, sizeof(buf), "repo-update\t%s\t%s",
|
||||
repo_id, commit_id);
|
||||
|
||||
publish_event (seaf->mq_mgr, SEAFILE_SERVER_CHANNEL_EVENT, buf);
|
||||
|
||||
g_free (repo_id);
|
||||
g_free (commit_id);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -534,7 +534,6 @@ publish_repo_event (RepoEventData *rdata)
|
||||
publish_event (seaf->mq_mgr, SEAFILE_SERVER_CHANNEL_EVENT, buf->str);
|
||||
|
||||
g_string_free (buf, TRUE);
|
||||
free_repo_event_data (rdata);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -548,7 +547,6 @@ publish_stats_event (StatsEventData *rdata)
|
||||
publish_event (seaf->mq_mgr, SEAFILE_SERVER_CHANNEL_STATS, buf->str);
|
||||
|
||||
g_string_free (buf, TRUE);
|
||||
free_stats_event_data (rdata);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -574,6 +572,7 @@ on_repo_oper (HttpServer *htp_server, const char *etype,
|
||||
g_free (vinfo->path);
|
||||
g_free (vinfo);
|
||||
}
|
||||
free_repo_event_data (rdata);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -588,6 +587,8 @@ send_statistic_msg (const char *repo_id, char *user, char *operation, guint64 by
|
||||
rdata->bytes = bytes;
|
||||
|
||||
publish_stats_event(rdata);
|
||||
|
||||
free_stats_event_data (rdata);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user