[Groonga-commit] pgroonga/pgroonga at 0e3c44d [master] Free allocated memory immediately

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Jul 26 16:35:43 JST 2015


Kouhei Sutou	2015-07-26 16:35:43 +0900 (Sun, 26 Jul 2015)

  New Revision: 0e3c44d24c5d66dbcf925aa935e04a8e9297fb6d
  https://github.com/pgroonga/pgroonga/commit/0e3c44d24c5d66dbcf925aa935e04a8e9297fb6d

  Message:
    Free allocated memory immediately

  Modified files:
    pgroonga.c

  Modified: pgroonga.c (+5 -1)
===================================================================
--- pgroonga.c    2015-07-26 16:18:55 +0900 (ffdc5d1)
+++ pgroonga.c    2015-07-26 16:35:43 +0900 (3edf11b)
@@ -211,10 +211,14 @@ PGrnGetEncoding(void)
 static void
 PGrnSetLogPath(void)
 {
+	char *databasePath;
 	char path[MAXPGPATH];
+
+	databasePath = GetDatabasePath(MyDatabaseId, DEFAULTTABLESPACE_OID);
 	join_path_components(path,
-						 GetDatabasePath(MyDatabaseId, DEFAULTTABLESPACE_OID),
+						 databasePath,
 						 PGrnLogBasename);
+	pfree(databasePath);
 	grn_default_logger_set_path(path);
 }
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index