*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
/* Implementation of registry functions. */
{ REG_KEY_READ, REG_KEY_WRITE, REG_KEY_EXECUTE, REG_KEY_ALL };
/******************************************************************
- free() function for struct regkey_info
+ free() function for struct registry_key
*****************************************************************/
static void free_regkey(void *ptr)
return WERR_BADFILE;
}
- return WERR_OK;;
+ return WERR_OK;
}
/*******************************************************************
topkeypath ));
return WERR_BADFILE;
}
- pstrcpy( registry_key.name, topkeypath );
+
+ registry_key.name = talloc_strdup( regfile->mem_ctx, topkeypath );
+ if ( !registry_key.name ) {
+ DEBUG(0,("reg_load_tree: Talloc failed for reg_key.name!\n"));
+ return WERR_NOMEM;
+ }
/* now start parsing the values and subkeys */