r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
[samba.git] / source3 / passdb / pdb_sql.c
index 37e408a3873fd8e29ce83881b7198f9079ef33ba..820280bcbf6d28be262ff2a16475449fc3d226c8 100644 (file)
@@ -78,7 +78,7 @@ static void pdb_sql_int_field(struct pdb_sql_query *q, const char *name, int val
 
 char *sql_escape_string(const char *unesc)
 {
-       char *esc = malloc(strlen(unesc) * 2 + 3);
+       char *esc = SMB_MALLOC(strlen(unesc) * 2 + 3);
        size_t pos_unesc = 0, pos_esc = 0;
 
        for(pos_unesc = 0; unesc[pos_unesc]; pos_unesc++) {
@@ -475,7 +475,7 @@ char *sql_account_query_update(const char *location, const SAM_ACCOUNT *newpwd,
                                                                   " VALUES (%s", query.part2);
        }
 
-       ret = strdup(query.part1);
+       ret = SMB_STRDUP(query.part1);
        talloc_destroy(query.mem_ctx);
        return ret;
 }