Commit 2df9acb2 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Use string_free to free things that are created with s_crea_c_str.

parent c59d62ce
Wed Sep 25 11:44:17 1991 Per Cederqvist (ceder at lysator)
* person.c (do_set_passwd, chk_passwd),
ram-parse.c (fparse_conference):
Use string_free and not sfree to free strings that was
created with s_crea_c_string.
* person.c (do_set_passwd): Fixed serious bug in salt generation.
Mon Sep 23 19:39:55 1991 Per Cederqvist (ceder at lysator)
......
/*
* $Id: person.c,v 0.11 1991/09/25 09:45:33 ceder Exp $
* $Id: person.c,v 0.12 1991/09/25 11:04:26 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* All atomic calls that deals with persons.
*/
static char *rcsid = "$Id: person.c,v 0.11 1991/09/25 09:45:33 ceder Exp $";
static char *rcsid = "$Id: person.c,v 0.12 1991/09/25 11:04:26 ceder Exp $";
#include <m-config.h>
#include <time.h>
......@@ -41,6 +41,7 @@ static char *rcsid = "$Id: person.c,v 0.11 1991/09/25 09:45:33 ceder Exp $";
#include "manipulate.h"
#include <kom-errno.h>
#include <server/smalloc.h>
#include "string-malloc.h>
#include "cache.h"
#include "log.h"
#include "minmax.h"
......@@ -90,7 +91,7 @@ do_set_passwd( Password pwd,
else
{
strcpy((char *)pwd, (const char *)crypt(password, salt));
sfree(password);
string_free(password);
return OK;
}
......@@ -357,12 +358,12 @@ chk_passwd (Password pwd,
if (strcmp ((const char *)pwd,
(const char *)crypt(c_try, (const char *)pwd)) != 0)
{
sfree(c_try);
string_free(c_try);
return FAILURE;
}
else
{
sfree(c_try);
string_free(c_try);
return OK;
}
......
/*
* $Id: ram-parse.c,v 0.7 1991/09/15 10:29:39 linus Exp $
* $Id: ram-parse.c,v 0.8 1991/09/25 11:04:24 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -29,7 +29,7 @@
* ram-parse.c -- parse objects from disk file.
*/
static char *rcsid = "$Id: ram-parse.c,v 0.7 1991/09/15 10:29:39 linus Exp $";
static char *rcsid = "$Id: ram-parse.c,v 0.8 1991/09/25 11:04:24 ceder Exp $";
/*
......@@ -54,6 +54,9 @@ static char *rcsid = "$Id: ram-parse.c,v 0.7 1991/09/15 10:29:39 linus Exp $";
#include <server/smalloc.h>
#include "com.h"
#include "connections.h"
#ifdef DISKERR
#include "string-malloc.h"
#endif
#define REALLOC(ptr, size) srealloc(ptr, size)
......@@ -175,7 +178,7 @@ fparse_conference(FILE *fp,
{
log("fparse_conference(): nice in %s was %d, set to %d.\n",
name, result->nice, new_nice);
sfree(name);
string_free(name);
}
result->nice = new_nice;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment