[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: branch: master updated (1.1.1.20070708-28-g31f6505)
The branch, master has been updated
via 31f65059cf1ce5be9b8a0987d4538fed075a6805 (commit)
from 305c10f50464f02e32d84140db69f158da6e4c47 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gnetlist/src/s_netattrib.c | 2 +-
gschem/src/x_autonumber.c | 4 ++--
gschem/src/x_dialog.c | 4 ++--
libgeda/src/g_rc.c | 6 +++---
libgeda/src/o_attrib.c | 28 ++++++++++++++--------------
libgeda/src/o_box_basic.c | 2 +-
libgeda/src/o_circle_basic.c | 2 +-
libgeda/src/o_line_basic.c | 2 +-
libgeda/src/o_picture.c | 6 +++---
libgeda/src/s_conn.c | 4 ++--
libgeda/src/s_hierarchy.c | 2 +-
libgeda/src/s_slib.c | 22 +++++++++++-----------
12 files changed, 42 insertions(+), 42 deletions(-)
=================
Commit Messages
=================
commit 31f65059cf1ce5be9b8a0987d4538fed075a6805
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Wed Jul 25 02:09:15 2007 +0100
Fixed two calls to free() where g_free() should have been used.
Updated Doxygen comments to note where memory should be freed with g_free()
rather than free(). Commented three instances where free() is correct.
:100644 100644 bd37ac0... 4e900b7... M gnetlist/src/s_netattrib.c
:100644 100644 b3f5504... 4e18b1c... M gschem/src/x_autonumber.c
:100644 100644 f0eab7c... d71ac90... M gschem/src/x_dialog.c
:100644 100644 90ec84f... 9aea0d1... M libgeda/src/g_rc.c
:100644 100644 c3ea319... 5dbb72f... M libgeda/src/o_attrib.c
:100644 100644 aca6198... d700aab... M libgeda/src/o_box_basic.c
:100644 100644 1d40447... a2c0891... M libgeda/src/o_circle_basic.c
:100644 100644 a081486... 3ec08a8... M libgeda/src/o_line_basic.c
:100644 100644 d14eb91... 6edff47... M libgeda/src/o_picture.c
:100644 100644 0f81cda... b18da40... M libgeda/src/s_conn.c
:100644 100644 cdbcfe0... 877fba2... M libgeda/src/s_hierarchy.c
:100644 100644 45b0a4e... 2892c93... M libgeda/src/s_slib.c
=========
Changes
=========
commit 31f65059cf1ce5be9b8a0987d4538fed075a6805
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Wed Jul 25 02:09:15 2007 +0100
Fixed two calls to free() where g_free() should have been used.
Updated Doxygen comments to note where memory should be freed with g_free()
rather than free(). Commented three instances where free() is correct.
diff --git a/gnetlist/src/s_netattrib.c b/gnetlist/src/s_netattrib.c
index bd37ac0..4e900b7 100644
--- a/gnetlist/src/s_netattrib.c
+++ b/gnetlist/src/s_netattrib.c
@@ -47,7 +47,7 @@
/* things to do here : */
/* write the net alias function */
-/* be sure to free returned string */
+/* be sure to g_free returned string */
char *s_netattrib_extract_netname(char *value)
{
char *return_value = NULL;
diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index b3f5504..4e18b1c 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -405,7 +405,7 @@ void autonumber_get_used(TOPLEVEL *w_current, AUTONUMBER_TEXT *autotext)
/* check for slotted symbol */
if ((numslot_str = o_attrib_search_numslots(o_parent, &o_numslots)) != NULL) {
sscanf(numslot_str," %d",&numslots);
- free(numslot_str);
+ g_free(numslot_str);
if (numslots > 0) {
slot_str=o_attrib_search_attrib_name(o_parent->attribs,"slot",0);
@@ -537,7 +537,7 @@ void autonumber_get_new_numbers(AUTONUMBER_TEXT *autotext, OBJECT *o_current,
if ((autotext->slotting) && o_parent != NULL) {
if ((numslot_str = o_attrib_search_numslots(o_parent, &o_numslots)) != NULL) {
sscanf(numslot_str," %d",&numslots);
- free(numslot_str);
+ g_free(numslot_str);
if (numslots > 0) {
/* Yes! -> new number and slot=1; add the other slots to the database */
*slot = 1;
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index f0eab7c..d71ac90 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -2185,7 +2185,7 @@ gint color_set(GtkWidget *w, gpointer data)
* \par Function Description
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*
*/
char *index2functionstring(int index)
@@ -2748,7 +2748,7 @@ int generic_confirm_dialog (const char *msg)
* \par Function Description
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
char *generic_filesel_dialog (const char *msg, const char *templ, gint flags)
{
diff --git a/libgeda/src/g_rc.c b/libgeda/src/g_rc.c
index 90ec84f..9aea0d1 100644
--- a/libgeda/src/g_rc.c
+++ b/libgeda/src/g_rc.c
@@ -417,19 +417,19 @@ SCM g_rc_component_library_command (SCM listcmd, SCM getcmd,
"component-library-command");
tmp_str = scm_to_locale_string (listcmd);
lcmdstr = g_strdup (tmp_str);
- free (tmp_str);
+ free (tmp_str); /* this should stay as free (allocated from guile) */
SCM_ASSERT (scm_is_string (getcmd), getcmd, SCM_ARG2,
"component-library-command");
tmp_str = scm_to_locale_string (getcmd);
gcmdstr = g_strdup (tmp_str);
- free (tmp_str);
+ free (tmp_str); /* this should stay as free (allocated from guile) */
SCM_ASSERT (scm_is_string (name), name, SCM_ARG3,
"component-library-command");
tmp_str = scm_to_locale_string (name);
namestr = g_strdup (tmp_str);
- free (tmp_str);
+ free (tmp_str); /* this should stay as free (allocated from guile) */
/* take care of any shell variables */
/*! \bug this may be a security risk! */
diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index c3ea319..5dbb72f 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -894,7 +894,7 @@ void o_save_attribs(FILE *fp, ATTRIB *attribs)
* Also, there cannot be any spaces beside the equals sign
* Changed: now it allocates memory for name and value strings.
* \warning
- * Caller must free these strings when not needed.
+ * Caller must g_free these strings when not needed.
*/
int o_attrib_get_name_value(char *string, char **name_ptr, char **value_ptr )
{
@@ -1008,7 +1008,7 @@ o_attrib_set_visible(TOPLEVEL *w_current, int flag)
* \param [in] string The value to set attribute string to.
*
* \note
- * The user of this function must free the
+ * The user of this function must g_free the
* <B>w_current->current_attribute</B> string after done using it.
* They must also free the input string.
*/
@@ -1033,7 +1033,7 @@ void o_attrib_set_string(TOPLEVEL *w_current, char *string)
strcpy(w_current->current_attribute,string);
- /* be sure to free this string somewhere and free the input string */
+ /* be sure to g_free this string somewhere and free the input string */
}
/*! \brief Get the parent OBJECT of an attribute.
@@ -1224,7 +1224,7 @@ void o_attrib_set_color(TOPLEVEL *w_current, ATTRIB *attributes)
* \return Character string with attribute value, NULL otherwise.
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
char *o_attrib_search_name(OBJECT *list, char *name, int counter)
{
@@ -1389,7 +1389,7 @@ OBJECT *o_attrib_search_string_list(OBJECT *list, char *string)
* \return Matching object value if found, NULL otherwise.
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
char *o_attrib_search_string_partial(OBJECT *object, char *search_for,
int counter)
@@ -1575,7 +1575,7 @@ OBJECT *o_attrib_search_attrib_value(ATTRIB *list, char *value, char *name,
* \return Character string with attribute value, NULL otherwise.
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
char *
o_attrib_search_attrib_name(ATTRIB *list, char *name, int counter)
@@ -1643,7 +1643,7 @@ o_attrib_search_attrib_name(ATTRIB *list, char *name, int counter)
* \return Character string with attribute value, NULL otherwise.
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
char *o_attrib_search_toplevel(OBJECT *list, char *name, int counter)
{
@@ -1698,7 +1698,7 @@ char *o_attrib_search_toplevel(OBJECT *list, char *name, int counter)
* \return Character string with attribute value, NULL otherwise.
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
/* be sure caller free's return value */
char *o_attrib_search_special(OBJECT *o_current)
@@ -1732,7 +1732,7 @@ char *o_attrib_search_special(OBJECT *o_current)
* \return Character string with attribute value, NULL otherwise.
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
char *o_attrib_search_name_single(OBJECT *object, char *name,
OBJECT **return_found)
@@ -1831,7 +1831,7 @@ char *o_attrib_search_name_single(OBJECT *object, char *name,
* \return Character string with attribute value, NULL otherwise.
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
/* be sure caller free's return value */
/* this function is like above, except that it returns the n'th occurance */
@@ -1933,7 +1933,7 @@ char *o_attrib_search_name_single_count(OBJECT *object, char *name,
* \return Character string with attribute value, NULL otherwise.
*
* \warning
- * Caller must free returned character string
+ * Caller must g_free returned character string
*/
char *o_attrib_search_slot(OBJECT *object, OBJECT **return_found)
{
@@ -1962,7 +1962,7 @@ char *o_attrib_search_slot(OBJECT *object, OBJECT **return_found)
* \return Character string with attribute value, NULL otherwise.
*
* \note
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
char *o_attrib_search_numslots(OBJECT *object, OBJECT **return_found)
{
@@ -1992,7 +1992,7 @@ char *o_attrib_search_numslots(OBJECT *object, OBJECT **return_found)
* \return Character string with attribute value, NULL otherwise.
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
char *o_attrib_search_default_slot(OBJECT *object)
{
@@ -2047,7 +2047,7 @@ OBJECT *o_attrib_search_pinseq(OBJECT *list, int pin_number)
* \return Character string with attribute value, NULL otherwise.
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
char *o_attrib_search_slotdef(OBJECT *object, int slotnumber)
{
diff --git a/libgeda/src/o_box_basic.c b/libgeda/src/o_box_basic.c
index aca6198..d700aab 100644
--- a/libgeda/src/o_box_basic.c
+++ b/libgeda/src/o_box_basic.c
@@ -412,7 +412,7 @@ OBJECT *o_box_read(TOPLEVEL *w_current, OBJECT *object_list, char buf[],
* \return A pointer to the BOX character string.
*
* \warning
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*/
char *o_box_save(OBJECT *object)
{
diff --git a/libgeda/src/o_circle_basic.c b/libgeda/src/o_circle_basic.c
index 1d40447..a2c0891 100644
--- a/libgeda/src/o_circle_basic.c
+++ b/libgeda/src/o_circle_basic.c
@@ -354,7 +354,7 @@ OBJECT *o_circle_read(TOPLEVEL *w_current, OBJECT *object_list, char buf[],
* \return A pointer to the circle OBJECT character string.
*
* \note
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*
*/
char *o_circle_save(OBJECT *object)
diff --git a/libgeda/src/o_line_basic.c b/libgeda/src/o_line_basic.c
index a081486..3ec08a8 100644
--- a/libgeda/src/o_line_basic.c
+++ b/libgeda/src/o_line_basic.c
@@ -350,7 +350,7 @@ OBJECT *o_line_read(TOPLEVEL *w_current, OBJECT *object_list, char buf[],
* \return A pointer to the line OBJECT character string.
*
* \note
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*
*/
char *o_line_save(OBJECT *object)
diff --git a/libgeda/src/o_picture.c b/libgeda/src/o_picture.c
index d14eb91..6edff47 100644
--- a/libgeda/src/o_picture.c
+++ b/libgeda/src/o_picture.c
@@ -245,7 +245,7 @@ OBJECT *o_picture_read(TOPLEVEL *w_current, OBJECT *object_list,
* \return A pointer to the picture OBJECT character string.
*
* \note
- * Caller must free returned character string.
+ * Caller must g_free returned character string.
*
*/
char *o_picture_save(OBJECT *object)
@@ -841,7 +841,7 @@ OBJECT *o_picture_copy(TOPLEVEL *w_current, OBJECT *list_tail,
* \return Array of rgb data from image.
*
* \note
- * Caller must free returned guint8 array.
+ * Caller must g_free returned guint8 array.
*/
guint8 *o_picture_rgb_data(GdkPixbuf *image)
{
@@ -880,7 +880,7 @@ guint8 *o_picture_rgb_data(GdkPixbuf *image)
* \return Array of mask data from image.
*
* \note
- * Caller must free returned guint8 array.
+ * Caller must g_free returned guint8 array.
*/
guint8 *o_picture_mask_data(GdkPixbuf *image)
{
diff --git a/libgeda/src/s_conn.c b/libgeda/src/s_conn.c
index 0f81cda..b18da40 100644
--- a/libgeda/src/s_conn.c
+++ b/libgeda/src/s_conn.c
@@ -785,7 +785,7 @@ int s_conn_net_search(OBJECT* new_net, int whichone, GList * conn_list)
* \par Function Description
*
* \warning
- * Caller must free returned GList pointer.
+ * Caller must g_list_free returned GList pointer.
* Do not free individual data items in list.
*/
GList *s_conn_return_others(GList *input_list, OBJECT *object)
@@ -816,7 +816,7 @@ GList *s_conn_return_others(GList *input_list, OBJECT *object)
* \par Function Description
*
* \warning
- * Caller must free returned GList pointer.
+ * Caller must g_list_free returned GList pointer.
* Do not free individual data items in list.
*/
GList *s_conn_return_complex_others(GList *input_list, OBJECT *object)
diff --git a/libgeda/src/s_hierarchy.c b/libgeda/src/s_hierarchy.c
index cdbcfe0..877fba2 100644
--- a/libgeda/src/s_hierarchy.c
+++ b/libgeda/src/s_hierarchy.c
@@ -279,7 +279,7 @@ void s_hierarchy_up(TOPLEVEL *w_current, int pid)
* \return A GList of PAGE pointers.
*
* \warning
- * Call must free returned GList.
+ * Call must g_list_free returned GList.
*/
GList *s_hierarchy_traversepages(TOPLEVEL *w_current,
gint flags)
diff --git a/libgeda/src/s_slib.c b/libgeda/src/s_slib.c
index 45b0a4e..2892c93 100644
--- a/libgeda/src/s_slib.c
+++ b/libgeda/src/s_slib.c
@@ -114,7 +114,7 @@ int s_slib_search_for_dirname(char *dir_name)
* \par Function Description
*
* \warning
- * Caller must free returned pointer.
+ * Caller must g_free returned pointer.
*/
char *s_slib_search_dirs(const char *basename)
{
@@ -179,7 +179,7 @@ char *s_slib_search_dirs(const char *basename)
* \par Function Description
*
* \warning
- * Caller must free returned pointer.
+ * Caller must g_free returned pointer.
*/
char *s_slib_search_lowlevel(const char *basename)
{
@@ -228,7 +228,7 @@ char *s_slib_search_lowlevel(const char *basename)
* \return The base file name in a character string.
*
* \warning
- * Caller must free returned pointer.
+ * Caller must g_free returned pointer.
*/
char *s_slib_getbasename(const char *rawname)
{
@@ -301,7 +301,7 @@ char *s_slib_getbasename(const char *rawname)
i--;
}
- /* be sure to free this somewhere */
+ /* be sure to g_free this somewhere */
return(return_filename);
}
@@ -326,7 +326,7 @@ char *s_slib_getbasename(const char *rawname)
* required stripping (up to the first period).
*
* \warning
- * Caller must free returned pointer.
+ * Caller must g_free returned pointer.
*/
char *s_slib_search(const char *filename, int flag)
{
@@ -347,7 +347,7 @@ char *s_slib_search(const char *filename, int flag)
case(SLIB_SEARCH_NEXT):
count++;
- /* be sure to free processed_name */
+ /* be sure to g_free processed_name */
processed_name = s_slib_getbasename(filename);
#if DEBUG
@@ -380,7 +380,7 @@ char *s_slib_search(const char *filename, int flag)
if (processed_name)
g_free(processed_name);
- /* don't forget to free this string */
+ /* don't forget to g_free this string */
return(string);
}
@@ -396,7 +396,7 @@ char *s_slib_search(const char *filename, int flag)
* for the file name as is and does no other changes to it.
*
* \warning
- * Caller must free returned pointer.
+ * Caller must g_free returned pointer.
*/
char *s_slib_search_single(const char *filename)
{
@@ -404,7 +404,7 @@ char *s_slib_search_single(const char *filename)
string = s_slib_search_lowlevel(filename);
- /* don't forget to free this string */
+ /* don't forget to g_free this string */
return(string);
}
@@ -443,7 +443,7 @@ void s_slib_init()
* \par Function Description
*
* \warning
- * Caller must free returned pointer.
+ * Caller must not free the returned pointer.
*/
/* returns slibs */
char *s_slib_getdir(int index)
@@ -463,7 +463,7 @@ char *s_slib_getdir(int index)
* \return A file name if one is found, NULL otherwise.
*
* \warning
- * Caller must free returned pointer.
+ * Caller must g_free returned pointer.
*
* The flag parameter can be one of the following values:
* <DL>
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs