C++ 迷宫问题,代码运行除了正确结果却提示出错

代码如下:

 #include<iostream>
using namespace std;

int main()
{
    //矩阵初始化
    int **migong;
    int h, w;
    int m, n;
    cout << "请输入迷宫高度h和迷宫宽度w:" << endl;
    cin >> h >> w;
    migong = new int *[h];
    for (int i = 0; i < h ; i++)
    {
        migong[i] = new int[w];
    }
    for (m = 0; m < h ; m++)
    {
        for (n = 0; n < w ; n++)
        {
            cin>>migong[m][n] ;
        }
    }
    //输出矩阵
    for (m = 0; m < h; m++)
    {
        for (n = 0; n < w; n++)
        {
            cout << migong[m][n] << "    ";
        }
        cout << endl;
    }
    int temp = 0;
    if (h >= w)
        temp = h;
    else
        temp = w;
    int *path_row = new int;//通行路径的行
    int *path_column = new int;//通行路径的列
    for (int i = 0; i < temp; i++)
        path_row[i] = path_column[i] = 0;
    int row = 0;
    int column = 0;
    int count = 0;
    do
    {
        column = 0;
        do
        {
            switch (migong[row][column])
            {
            case 3:
                cout << "入口坐标为:" << "(" << row << "," << column << ")" << endl;
            }
            switch (migong[row][column])
            {
            case 0:
                path_row[count] = row;
                path_column[count] = column;
                cout << "(" << row << "," << column << ")" << endl;
                count++;
                break;
            case 1:
                break;
            }
            switch (migong[row][column])
            {
            case 4:
                cout << "出口坐标为:" << "(" << row << "," << column << ")" << endl;
            }
            column += 1;
        } while (column < w);
        row += 1;
    }while (row < h);
    for (m = 0; m < h ; m++)
    {
        delete[] migong[m];
    }
    delete migong;
    delete path_row;
    delete path_column;
    system("pause");
    return 0;
}

麻烦各位大神看看是哪儿出错了

如果结果正确却丢出异常,显然是delete的问题。