Don't use `&extension=com_content`. Hardcoding this to `com_content` is wrong since com_categories used by other extensions as well.
You need to get the extension parameter from the request like done a few lines above in the same file: Get extension: https://github.com/gwkant/joomla-cms/blob/2.5.x/administrator/components/com_categories/controllers/categories.php#L96
Append to redirect: https://github.com/gwkant/joomla-cms/blob/2.5.x/administrator/components/com_categories/controllers/categories.php#L122