diff --git a/src/modules/Image/matrix.c b/src/modules/Image/matrix.c
index 4566b972d090141181b423c7500a542084f61568..763844d1c87357169b8c4fdfd60634b3effc0458 100644
--- a/src/modules/Image/matrix.c
+++ b/src/modules/Image/matrix.c
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: matrix.c,v 1.44 2003/03/20 14:25:23 grubba Exp $
+|| $Id: matrix.c,v 1.45 2003/03/22 16:44:16 grubba Exp $
 */
 
 /*
@@ -333,6 +333,7 @@ void image_scale(INT32 args)
 
    if (args==1 && sp[-args].type==T_INT)
    {
+      free_object(o);
       image_bitscale( args );
       return;
    }
@@ -344,6 +345,7 @@ void image_scale(INT32 args)
       {
          if( floor( sp[-args].u.float_number ) == sp[-args].u.float_number)
          {
+	    free_object(o);
             image_bitscale( args );
             return;
          }