if (ISSET(t, B_DELCRSR)) {
if ((p = (void*)malloc(t->bt_psize)) == NULL)
return (RET_ERROR);
- if ((h = mpool_get(t->bt_mp, t->bt_bcursor.pgno, 0)) == NULL)
+ if ((h = mpool_get(t->bt_mp, t->bt_bcursor.pgno, 0)) == NULL) {
+ free(p);
return (RET_ERROR);
+ }
memmove(p, h, t->bt_psize);
if ((status =
__bt_dleaf(t, h, t->bt_bcursor.index)) == RET_ERROR)
CLR(t, B_MODIFIED);
ecrsr: if (ISSET(t, B_DELCRSR)) {
- if ((h = mpool_get(t->bt_mp, t->bt_bcursor.pgno, 0)) == NULL)
+ if ((h = mpool_get(t->bt_mp, t->bt_bcursor.pgno, 0)) == NULL) {
+ free(p);
return (RET_ERROR);
+ }
memmove(h, p, t->bt_psize);
free(p);
mpool_put(t->bt_mp, h, MPOOL_DIRTY);
while (*desc != '\0' && *desc != '\t') desc++;
- if (*desc != '\t')
+ if (*desc != '\t') {
+ free(u);
return 0;
+ }
desc++;
int new_blank_len = slot_info -> string_leng() ;
- if ( new_blank_len < size )
+ if ( new_blank_len < size ) {
+ delete slot_info;
return false;
+ }
slot_info -> set_string_ofst( end_ptr );
slot_info -> set_string_leng( size );
slot_info -> set_mode(spointer_t::DELETED, false);
slot_info -> set_forward_ptr(0);
- delete slot_info;
+ delete slot_info;
if ( slot_num == count() ) {
spointer_t *x = y -> get_spointer(slot_num);
- if ( x -> get_mode(spointer_t::DELETED) == true )
+ if ( x -> get_mode(spointer_t::DELETED) == true ) {
+ delete x;
return 0;
+ }
loc = x -> forward_ptr();
//debug(cerr, loc);
string::~string()
{
+ delete sbuf;
}
char* string::c_str()
file = strdup(netfile);
if (file == NULL || *file == '\0') {
+ if(file) {
+ tt_free(file);
+ }
XtFree(netfile);
XmTransferDone(cs->transfer_id, XmTRANSFER_DONE_FAIL);
return;
MessageAgent::displayMessage (char *message_text)
{
char *message_string = strdup(message_text);
- if(f_dialog == NULL)
+ if(f_dialog == NULL) {
+ free(message_string);
return;
+ }
XmStringLocalized mtfstring;
char *message_string = strdup(message_text);
if (f_dialog == NULL)
create_ui(parent);
- if (g_active)
+ if (g_active) {
+ free(message_string);
return;
+ }
g_active = TRUE;
// Set the window title
char *message_string = strdup(message_text);
if (f_dialog == NULL)
create_ui(parent);
- if (g_active)
+ if (g_active) {
+ free(message_string);
return;
+ }
g_active = TRUE;
// Set the window title
if (f_dialog == NULL)
create_ui(parent);
- if (g_active)
+ if (g_active) {
+ free(message_string);
return;
+ }
g_active = TRUE;
// Set the window title
if (f_dialog == NULL)
create_ui(parent);
- if (g_active)
+ if (g_active) {
+ free(message_string);
return (FALSE);
+ }
g_active = TRUE;
// Set the window title
if (f_dialog == NULL)
create_ui(parent);
- if (g_active)
+ if (g_active) {
+ free(message_string);
return;
+ }
g_active = TRUE;
// Set the window title
static void
OutputAnAtomName(Widget w, Atom target)
{
- char *AtomName = (char *)malloc(sizeof(char *) * 34);
+ char *AtomName = NULL;
AtomName = XGetAtomName(XtDisplay(w), target);
printf("\t%s\n", AtomName);
+ XFree(AtomName);
}
// /////////////////////////////////////////////////////////////////
// write out the locator
if (fputs(((TOC_Element *)te)->toc()->locator(), fp) == EOF) {
fprintf(stderr, "Cannot write file %s in current directory.\n", filepath);
+ fclose(fp);
return;
}
// write out eol
if (fputs("\n", fp) == EOF) {
fprintf(stderr, "Cannot write file %s in current directory.\n", filepath);
+ fclose(fp);
return;
}
printf("pattern = %s.\n", pattern);
#endif
xlfd = strdup(pattern);
+ free(dupfallback);
return(xlfd);
}
#ifdef FONT_DEBUG
printf("xlfd = %s.\n", xlfd);
#endif
+
+ free(dupfallback);
return(xlfd);
}
fclose( fp );
return ( full_path_name );
}
+ fclose( fp );
}
return NULL;
else {
Token::signalError(Token::User, Token::Continuable, 0, 0,
"Duplicate stylesheet id `%s'", localstr);
+ delete bogus;
return;
}