diff --git a/source/blender/python/api2_2x/NMesh.c b/source/blender/python/api2_2x/NMesh.c
index f08882ebcc1ecf5392565a5259824778cde9f000..7862330f4255dc8e315d21bc4865b23ba138e956 100644
--- a/source/blender/python/api2_2x/NMesh.c
+++ b/source/blender/python/api2_2x/NMesh.c
@@ -2064,6 +2064,8 @@ static int unlink_existingMeshData( Mesh * mesh )
 	EXPP_unlink_mesh( mesh );
 	if( mesh->mvert )
 		MEM_freeN( mesh->mvert );
+	if( mesh->medge )
+		MEM_freeN( mesh->medge );
 	if( mesh->mface )
 		MEM_freeN( mesh->mface );
 	if( mesh->mcol )
@@ -2171,6 +2173,7 @@ static int convert_NMeshToMesh( Mesh * mesh, BPy_NMesh * nmesh )
 	int i, j;
 
 	mesh->mvert = NULL;
+	mesh->medge = NULL;
 	mesh->mface = NULL;
 	mesh->mcol = NULL;
 	mesh->msticky = NULL;