Fix bug in pg_convert() per report from MaC.Yui.
authorTatsuo Ishii <[email protected]>
Mon, 19 Aug 2002 04:58:26 +0000 (04:58 +0000)
committerTatsuo Ishii <[email protected]>
Mon, 19 Aug 2002 04:58:26 +0000 (04:58 +0000)
It pfree() wrong pointer.

src/backend/utils/mb/mbutils.c

index 43fd05f598592d8f4b010d9c05a8e80258d925f9..6f7869cf119ff0698fc6aaa28e491eb5ddd6e5e2 100644 (file)
@@ -3,7 +3,7 @@
  * client encoding and server internal encoding.
  * (currently mule internal code (mic) is used)
  * Tatsuo Ishii
- * $Id: mbutils.c,v 1.27 2001/11/20 01:32:29 ishii Exp $
+ * $Id: mbutils.c,v 1.27.2.1 2002/08/19 04:58:26 ishii Exp $
  */
 #include "postgres.h"
 
@@ -222,7 +222,7 @@ pg_convert(PG_FUNCTION_ARGS)
        pg_convert2, string, src_encoding_name, dest_encoding_name);
 
    /* free memory allocated by namein */
-   pfree((void *)dest_encoding_name);
+   pfree((void *)src_encoding_name);
 
    PG_RETURN_TEXT_P(result);
 }